-Update TODO

- Fix indenting
This commit is contained in:
Babak Farrokhi 2015-10-31 12:53:53 +03:30
parent 988d46ae37
commit 5bdb4b048c
3 changed files with 13 additions and 14 deletions

View File

@ -1,2 +1,3 @@
* ~~Add support for IPv6 (autodetect)~~
* Add optional syslog support
* Add command line options for IPv4/IPv6, port number, logging method, etc

10
fsipd.c
View File

@ -59,7 +59,6 @@
#define IPV6_BINDV6ONLY IPV6_V6ONLY
#endif /* IPV6_BINDV6ONLY */
/*
* Globals
*/
@ -121,7 +120,7 @@ signal_handler(int sig)
switch (sig) {
case SIGHUP:
log_reopen(&lfh);
log_reopen(&lfh); /* necessary for log file rotation */
break;
case SIGINT:
case SIGTERM:
@ -163,6 +162,7 @@ process_request(int af, struct sockaddr *src, int proto, char *str)
chomp(str);
/* todo: add optional syslog support */
#ifdef PF_INET6
switch (af) {
case AF_INET6:
@ -201,8 +201,8 @@ init_tcp()
perror("tcp6 socket()");
return (EXIT_FAILURE);
}
int on = 1;
setsockopt(t6_sockfd, IPPROTO_IPV6, IPV6_BINDV6ONLY, (char *)&on, sizeof(on));
if (bind(t6_sockfd, (struct sockaddr *)&t6_sa, sizeof(t6_sa)) < 0) {
@ -246,8 +246,8 @@ init_udp()
perror("udp6 socket()");
return (EXIT_FAILURE);
}
int on = 1;
setsockopt(u6_sockfd, IPPROTO_IPV6, IPV6_BINDV6ONLY, (char *)&on, sizeof(on));
if (bind(u6_sockfd, (struct sockaddr *)&u6_sa, sizeof(u6_sa)) < 0) {
@ -269,7 +269,6 @@ init_udp()
perror("udp4 bind()");
return (EXIT_FAILURE);
}
return (EXIT_SUCCESS);
}
@ -397,7 +396,6 @@ daemon_start()
if ((lfh = log_open("fsipd.log", 0644)) == NULL) {
err(EXIT_FAILURE, "Cannot open log file");
}
/* Initialize TCP46 and UDP46 sockets */
if (init_tcp() == EXIT_FAILURE)
return (EXIT_FAILURE);