[Olsr-cvs] olsrd-current/src/bsd net.c,1.39,1.40
Bernd Petrovitsch
(spam-protected)
Thu Nov 29 01:07:39 CET 2007
Update of /cvsroot/olsrd/olsrd-current/src/bsd
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv556/src/bsd
Modified Files:
net.c
Log Message:
- a forgotten hangelog entry
- a few more trivial BSD fixes
Index: net.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/bsd/net.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** net.c 4 Nov 2007 18:57:17 -0000 1.39
--- net.c 29 Nov 2007 00:07:37 -0000 1.40
***************
*** 155,168 ****
int enable_ip_forwarding(int version)
{
! char *name;
!
! if (olsr_cnf->ip_version == AF_INET)
! name = "net.inet.ip.forwarding";
!
! else
! name = "net.inet6.ip6.forwarding";
gateway = set_sysctl_int(name, 1);
-
if (gateway < 0)
{
--- 155,163 ----
int enable_ip_forwarding(int version)
{
! const char *name = version == AF_INET
! ? "net.inet.ip.forwarding"
! : "net.inet6.ip6.forwarding";
gateway = set_sysctl_int(name, 1);
if (gateway < 0)
{
***************
*** 177,188 ****
disable_redirects_global(int version)
{
! char *name;
// do not accept ICMP redirects
#ifdef __OpenBSD__
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.icmp.rediraccept";
-
else
name = "net.inet6.icmp6.rediraccept";
--- 172,182 ----
disable_redirects_global(int version)
{
! const char *name;
// do not accept ICMP redirects
#ifdef __OpenBSD__
! if (version == AF_INET)
name = "net.inet.icmp.rediraccept";
else
name = "net.inet6.icmp6.rediraccept";
***************
*** 190,194 ****
ignore_redir = set_sysctl_int(name, 0);
#elif defined __FreeBSD__ || defined __MacOSX__
! if (olsr_cnf->ip_version == AF_INET)
{
name = "net.inet.icmp.drop_redirect";
--- 184,188 ----
ignore_redir = set_sysctl_int(name, 0);
#elif defined __FreeBSD__ || defined __MacOSX__
! if (version == AF_INET)
{
name = "net.inet.icmp.drop_redirect";
***************
*** 201,207 ****
}
#else
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.icmp.drop_redirect";
-
else
name = "net.inet6.icmp6.drop_redirect";
--- 195,200 ----
}
#else
! if (version == AF_INET)
name = "net.inet.icmp.drop_redirect";
else
name = "net.inet6.icmp6.drop_redirect";
***************
*** 218,229 ****
// do not send ICMP redirects
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.ip.redirect";
-
else
name = "net.inet6.ip6.redirect";
send_redir = set_sysctl_int(name, 0);
-
if (send_redir < 0)
{
--- 211,220 ----
// do not send ICMP redirects
! if (version == AF_INET)
name = "net.inet.ip.redirect";
else
name = "net.inet6.ip6.redirect";
send_redir = set_sysctl_int(name, 0);
if (send_redir < 0)
{
***************
*** 251,261 ****
int restore_settings(int version)
{
! char *name;
// reset IP forwarding
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.ip.forwarding";
-
else
name = "net.inet6.ip6.forwarding";
--- 242,251 ----
int restore_settings(int version)
{
! const char *name;
// reset IP forwarding
! if (version == AF_INET)
name = "net.inet.ip.forwarding";
else
name = "net.inet6.ip6.forwarding";
***************
*** 266,270 ****
#ifdef __OpenBSD__
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.icmp.rediraccept";
else
--- 256,260 ----
#ifdef __OpenBSD__
! if (version == AF_INET)
name = "net.inet.icmp.rediraccept";
else
***************
*** 272,284 ****
#elif defined __FreeBSD__ || defined __MacOSX__
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.icmp.drop_redirect";
-
else
name = "net.inet6.icmp6.rediraccept";
#else
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.icmp.drop_redirect";
-
else
name = "net.inet6.icmp6.drop_redirect";
--- 262,272 ----
#elif defined __FreeBSD__ || defined __MacOSX__
! if (version == AF_INET)
name = "net.inet.icmp.drop_redirect";
else
name = "net.inet6.icmp6.rediraccept";
#else
! if (version == AF_INET)
name = "net.inet.icmp.drop_redirect";
else
name = "net.inet6.icmp6.drop_redirect";
***************
*** 289,295 ****
// reset outgoing ICMP redirects
! if (olsr_cnf->ip_version == AF_INET)
name = "net.inet.ip.redirect";
-
else
name = "net.inet6.ip6.redirect";
--- 277,282 ----
// reset outgoing ICMP redirects
! if (version == AF_INET)
name = "net.inet.ip.redirect";
else
name = "net.inet6.ip6.redirect";
***************
*** 490,494 ****
mcastreq.ipv6mr_interface = ifs->if_index;
! OLSR_PRINTF(3, "Interface %s joining multicast %s...", ifs->int_name, olsr_ip_to_string((union olsr_ip_addr *)&ifs->int6_multaddr.sin6_addr));
/* rfc 3493 */
--- 477,481 ----
mcastreq.ipv6mr_interface = ifs->if_index;
! OLSR_PRINTF(3, "Interface %s joining multicast %s...", ifs->int_name, olsr_ip_to_string((union olsr_ip_addr *)&ifs->int6_multaddr.sin6_addr));
/* rfc 3493 */
More information about the Olsr-cvs
mailing list