summaryrefslogtreecommitdiff
path: root/lib/sockunion.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2008-07-21 21:02:49 +0000
committerPaul Jakma <paul.jakma@sun.com>2008-07-21 21:02:49 +0000
commit0df7c91f048f2116610d6bdfce3ab6cad1981802 (patch)
tree18390aa845054b757fae86dde49b907ee7f14908 /lib/sockunion.c
parentf04b0e6bb8c1339243717b156880d7e24c84c951 (diff)
[bgpd] TCP-MD5: password vty configuration and initial Linux support
2008-07-21 Paul Jakma <paul.jakma@sun.com> * bgp_packet.c: (bgp_open_receive) fix warning in a zlog call * bgp_vty.c: (bgp_vty_return) add return code * bgpd.c: (bgp_master_init) setup the socket list. * bgp_network.c: Remove the dual IPv4/6 socket thing for now, which was implemented by Michael, until such time as its clear its required for Linux (see sockopt comments). IPv6 support, including IPv4 sessions on AF_INET6 sockets, therefore is broken, and the '-l 0.0.0.0' arguments would need to be given to bgpd to make things work here. 2008-07-21 Michael H. Warfield <mhw@wittsend.com> YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Tomohiko Kusuda <kusuda@inetcore.com> Leigh Brown <leigh@solinno.co.uk> * bgp_network.c: (bgp_md5_set_one) shim between libzebra tcp-md5 sockopt and bgpd. (bgp_md5_set_socket) Helper for bgp_connect (bgp_md5_set) setup TCP-MD5SIG for the given peer. (bgp_connect) call out to bgp_md5_set_socket for the outgoing connect socket. (bgp_socket) save references to the listen sockets, needed if TCP-MD5SIG is applied later or changed. * bgp_vty.c: (*neighbor_password_cmd) New 'neighbor ... password' commands. * bgpd.c: (peer_{new,delete) manage TCP-MD5 password (peer_group2peer_config_copy) inherit TCP-MD5 password (peer_password_{un,}set) orchestrate the whole add/remove of TCP-MD5 passwords: applying checks, stopping peers, and trying to return errors to UI, etc. (bgp_config_write_peer) save password. Fix missing newline in writeout of neighbor ... port. 2008-07-21 Paul Jakma <paul.jakma@sun.com> * sockunion.c: ifdef out various places that converted v4mapped sockets to pure v4. Doesn't seem necessary at all, presumably a workaround for now historical inet_ntop bugs (?) 2008-07-21 Michael H. Warfield <mhw@wittsend.com> YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> * sockopt.{c,h}: (sockopt_tcp_signature) Add TCP-MD5SIG support.
Diffstat (limited to 'lib/sockunion.c')
-rw-r--r--lib/sockunion.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 7721666e..cfd3bf9a 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -254,6 +254,7 @@ sockunion_accept (int sock, union sockunion *su)
client_sock = accept (sock, (struct sockaddr *) su, &len);
/* Convert IPv4 compatible IPv6 address to IPv4 address. */
+#if 0
#ifdef HAVE_IPV6
if (su->sa.sa_family == AF_INET6)
{
@@ -268,7 +269,7 @@ sockunion_accept (int sock, union sockunion *su)
}
}
#endif /* HAVE_IPV6 */
-
+#endif
return client_sock;
}
@@ -592,6 +593,7 @@ sockunion_getsockname (int fd)
su = XCALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
memcpy (su, &name, sizeof (struct sockaddr_in6));
+#if 0
if (IN6_IS_ADDR_V4MAPPED (&su->sin6.sin6_addr))
{
struct sockaddr_in sin;
@@ -601,6 +603,7 @@ sockunion_getsockname (int fd)
sin.sin_port = su->sin6.sin6_port;
memcpy (su, &sin, sizeof (struct sockaddr_in));
}
+#endif
return su;
}
#endif /* HAVE_IPV6 */
@@ -645,7 +648,7 @@ sockunion_getpeername (int fd)
{
su = XCALLOC (MTYPE_SOCKUNION, sizeof (union sockunion));
memcpy (su, &name, sizeof (struct sockaddr_in6));
-
+#if 0
if (IN6_IS_ADDR_V4MAPPED (&su->sin6.sin6_addr))
{
struct sockaddr_in sin;
@@ -655,6 +658,7 @@ sockunion_getpeername (int fd)
sin.sin_port = su->sin6.sin6_port;
memcpy (su, &sin, sizeof (struct sockaddr_in));
}
+#endif
return su;
}
#endif /* HAVE_IPV6 */