Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet PR/991: Darren Reed: Add a sysctl (checkinteface...



details:   https://anonhg.NetBSD.org/src/rev/e58d345cfd92
branches:  trunk
changeset: 545613:e58d345cfd92
user:      dogcow <dogcow%NetBSD.org@localhost>
date:      Sat Apr 12 00:17:49 2003 +0000

description:
PR/991: Darren Reed: Add a sysctl (checkinteface) to implement this. This
implementation is taken from FreeBSD, but we default to off.
XXX: We should really do this on a per ifaddr basis as jason suggested.

diffstat:

 sys/netinet/in.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 8241bab4cb6a -r e58d345cfd92 sys/netinet/in.h
--- a/sys/netinet/in.h  Fri Apr 11 22:46:02 2003 +0000
+++ b/sys/netinet/in.h  Sat Apr 12 00:17:49 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.h,v 1.59 2003/01/27 09:57:09 kleink Exp $   */
+/*     $NetBSD: in.h,v 1.60 2003/04/12 00:17:49 dogcow Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -382,8 +382,9 @@
 #define        IPCTL_LOWPORTMIN       16       /* minimum reserved port */
 #define        IPCTL_LOWPORTMAX       17       /* maximum reserved port */
 #define        IPCTL_MAXFRAGPACKETS   18       /* max packets reassembly queue */
-#define IPCTL_GRE_TTL          19      /* default TTL for gre encap packet */
-#define        IPCTL_MAXID            20
+#define        IPCTL_GRE_TTL          19       /* default TTL for gre encap packet */
+#define        IPCTL_CHECKINTERFACE   20       /* drop pkts in from 'wrong' iface */
+#define        IPCTL_MAXID            21
 
 #define        IPCTL_NAMES { \
        { 0, 0 }, \
@@ -406,6 +407,7 @@
        { "lowportmax", CTLTYPE_INT }, \
        { "maxfragpackets", CTLTYPE_INT }, \
        { "grettl", CTLTYPE_INT }, \
+       { "checkinterface", CTLTYPE_INT }, \
 }
 #endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
 



Home | Main Index | Thread Index | Old Index