diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-27 14:25:29 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-27 14:25:29 -0700 |
commit | ea01b56bc3f43b268d32d175095a2a930d3b2967 (patch) | |
tree | e3e11bc827541bc983105a731636a78bc30bb5fa /lib/sockopt.c | |
parent | 0eb78a78cffc4a5c13e2b5daff5fa257b3f1d8d6 (diff) | |
parent | d3e384e4f00aa90db4310f82f3cbe6528e256334 (diff) | |
download | quagga-ea01b56bc3f43b268d32d175095a2a930d3b2967.tar.bz2 quagga-ea01b56bc3f43b268d32d175095a2a930d3b2967.tar.xz |
Merge in latest quagga (0.99.11)
Merge in current upstream version of quagga.
Diffstat (limited to 'lib/sockopt.c')
-rw-r--r-- | lib/sockopt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c index 2f01199a..3a25ae1a 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -499,6 +499,7 @@ int sockopt_tcp_signature (int sock, union sockunion *su, const char *password) { #if HAVE_DECL_TCP_MD5SIG + int ret; #ifndef GNU_LINUX /* * XXX Need to do PF_KEY operation here to add/remove an SA entry, @@ -509,7 +510,6 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password) int keylen = password ? strlen (password) : 0; struct tcp_md5sig md5sig; union sockunion *su2, *susock; - int ret; /* Figure out whether the socket and the sockunion are the same family.. * adding AF_INET to AF_INET6 needs to be v4 mapped, you'd think.. @@ -553,11 +553,12 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password) md5sig.tcpm_keylen = keylen; if (keylen) memcpy (md5sig.tcpm_key, password, keylen); + sockunion_free (susock); #endif /* GNU_LINUX */ ret = setsockopt (sock, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof md5sig); - sockunion_free (susock); return ret; #else /* HAVE_TCP_MD5SIG */ return -2; #endif /* HAVE_TCP_MD5SIG */ } + |