patch-2.2.18 linux/net/ipv4/af_inet.c
Next file: linux/net/ipv4/arp.c
Previous file: linux/net/ipv4/Config.in
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Wed Nov 1 16:58:24 2000
- Orig file:
v2.2.17/net/ipv4/af_inet.c
- Orig date:
Sat Sep 9 18:42:51 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -5,7 +5,7 @@
*
* PF_INET protocol family socket handler.
*
- * Version: $Id: af_inet.c,v 1.87.2.6 2000/01/13 04:28:16 davem Exp $
+ * Version: $Id: af_inet.c,v 1.87.2.11 2000/10/24 21:28:46 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -109,6 +109,11 @@
#ifdef CONFIG_BRIDGE
#include <net/br.h>
#endif
+
+#ifdef CONFIG_NET_DIVERT
+#include <linux/divert.h>
+#endif /* CONFIG_NET_DIVERT */
+
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
@@ -536,7 +541,8 @@
snum = ntohs(addr->sin_port);
#ifdef CONFIG_IP_MASQUERADE
/* The kernel masquerader needs some ports. */
- if((snum >= PORT_MASQ_BEGIN) && (snum <= PORT_MASQ_END))
+ if((snum >= PORT_MASQ_BEGIN) && (snum <= PORT_MASQ_END) &&
+ chk_addr_ret != RTN_MULTICAST)
return -EADDRINUSE;
#endif
if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE))
@@ -912,6 +918,14 @@
return -ENOPKG;
#endif
+ case SIOCGIFDIVERT:
+ case SIOCSIFDIVERT:
+#ifdef CONFIG_NET_DIVERT
+ return(divert_ioctl(cmd, (struct divert_cf *) arg));
+#else
+ return -ENOPKG;
+#endif /* CONFIG_NET_DIVERT */
+
case SIOCADDDLCI:
case SIOCDELDLCI:
#ifdef CONFIG_DLCI
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)