summaryrefslogtreecommitdiff
path: root/lib/sockopt.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-08-25 02:54:38 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-08-25 02:56:05 +0200
commit3535a785b8b1f73c79cf6486aa72db7b4ca8bab9 (patch)
tree359e9c752624f4f07b09a48b0f947d65b2e6c443 /lib/sockopt.c
parent796850390932a3cb06d7bdb5a67e689cb3309fd7 (diff)
lib: remove Linux 2.4 TCP-MD5 support
Linux 2.6.0 was released in December of 2003... I'm pretty sure we don't need this Linux 2.4 support anymore. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/sockopt.c')
-rw-r--r--lib/sockopt.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c
index 878b5ae09d..3febcb714d 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -580,31 +580,7 @@ int sockopt_tcp_rtt(int sock)
int sockopt_tcp_signature(int sock, union sockunion *su, const char *password)
{
-#if defined(HAVE_TCP_MD5_LINUX24) && defined(GNU_LINUX)
-/* Support for the old Linux 2.4 TCP-MD5 patch, taken from Hasso Tepper's
- * version of the Quagga patch (based on work by Rick Payne, and Bruce
- * Simpson)
- */
-#define TCP_MD5_AUTH 13
-#define TCP_MD5_AUTH_ADD 1
-#define TCP_MD5_AUTH_DEL 2
- struct tcp_rfc2385_cmd {
- uint8_t command; /* Command - Add/Delete */
- uint32_t address; /* IPV4 address associated */
- uint8_t keylen; /* MD5 Key len (do NOT assume 0 terminated
- ascii) */
- void *key; /* MD5 Key */
- } cmd;
- struct in_addr *addr = &su->sin.sin_addr;
-
- cmd.command = (password != NULL ? TCP_MD5_AUTH_ADD : TCP_MD5_AUTH_DEL);
- cmd.address = addr->s_addr;
- cmd.keylen = (password != NULL ? strlen(password) : 0);
- cmd.key = password;
-
- return setsockopt(sock, IPPROTO_TCP, TCP_MD5_AUTH, &cmd, sizeof cmd);
-
-#elif HAVE_DECL_TCP_MD5SIG
+#if HAVE_DECL_TCP_MD5SIG
int ret;
#ifndef GNU_LINUX
/*