summaryrefslogtreecommitdiff
path: root/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-02-05 22:19:43 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-02-05 22:19:43 +0000
commitd2734c189496ba5970ac98a8a45b7b6d0266aa33 (patch)
treeecf437b1beb30c3a958629b2aa018a55e2f5fd8b /net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c
parentSage is an OpenGL extension library written to make use of SDL's mechanism for (diff)
- Update to 0.98.2
PR: ports/77086 Submitted by: Boris Kovalenko <boris@tagnet.ru> (maintainer)
Notes
Notes: svn path=/head/; revision=128104
Diffstat (limited to 'net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c')
-rw-r--r--net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c b/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c
new file mode 100644
index 000000000000..d44ec4949c01
--- /dev/null
+++ b/net/quagga/files/extra-tcpmd5-patch-lib::sockopt.c
@@ -0,0 +1,35 @@
+--- lib/sockopt.c.orig Tue Jan 4 10:03:36 2005
++++ lib/sockopt.c Fri Jan 28 17:52:57 2005
+@@ -243,6 +243,32 @@
+
+ }
+
++int
++sockopt_tcp_signature (int family, int sock, int enable)
++{
++ int ret;
++
++#if defined(QUAGGA_TCP_MD5SIG) && defined(TCP_MD5SIG)
++ if (family == AF_INET)
++ {
++ ret = setsockopt (sock, IPPROTO_TCP, TCP_MD5SIG,
++ (void *) &enable, sizeof (int));
++ if (ret < 0)
++ {
++ zlog (NULL, LOG_WARNING, "can't set sockopt TCP_MD5SIG %d to socket %d", enable, sock);
++ return -1;
++ }
++ return 0;
++ }
++#endif /* QUAGGA_TCP_MD5SIG */
++
++ /* fallthrough */
++
++ zlog (NULL, LOG_WARNING, "can't set sockopt TCP_MD5SIG on socket %d with family %d",
++ sock, family);
++ return -1;
++}
++
+ static int
+ setsockopt_ipv4_ifindex (int sock, int val)
+ {