diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-23 14:15:54 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-23 14:15:54 +0000 |
commit | 02f70d316e2b1fab7065eb4b91f04d359651b629 (patch) | |
tree | 1ee7babacfef9e54dd372c5067db4f3b0fc463e1 /sys/net/route.h | |
parent | 9704b0e5264a052e2e3e2a4acec4e6d46da82778 (diff) |
Until now it was only possible to unset the RTF_JUMBO flag on a RTM_CHANGE
request. Extend the "hack" to include more flags (RTF_PROTO[123] flags,
RTF_BLACKHOLE, RTF_REJECT and RTF_STATIC). Because rtm_use is "abused" --
rtm_use was replaced long time ago with rtm_rmx->rmx_pksent -- it is now
forced to 0 in RTM_GET requests and sysctl_dumpentry(). This is done to
prevent false changes because of a reused RTM_GET message.
OK henning@, mcbride@, makes sense markus@
Diffstat (limited to 'sys/net/route.h')
-rw-r--r-- | sys/net/route.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index 9d935799fed..59a8d5f369f 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.34 2005/11/29 02:59:42 jolan Exp $ */ +/* $OpenBSD: route.h,v 1.35 2006/02/23 14:15:53 claudio Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -141,6 +141,11 @@ struct rtentry { #define RTF_MPATH 0x40000 /* multipath route or operation */ #define RTF_JUMBO 0x80000 /* try to use jumbo frames */ +/* mask of RTF flags that are allowed to be modified by RTM_CHANGE */ +#define RTF_FMASK \ + (RTF_JUMBO | RTF_PROTO1 | RTF_PROTO2 | RTF_PROTO3 | RTF_BLACKHOLE | \ + RTF_REJECT | RTF_STATIC) + #ifndef _KERNEL /* obsoleted */ #define RTF_TUNNEL 0x100000 /* Tunnelling bit. */ @@ -170,7 +175,7 @@ struct rt_msghdr { pid_t rtm_pid; /* identify sender */ int rtm_seq; /* for sender to identify action */ int rtm_errno; /* why failed */ - int rtm_use; /* from rtentry */ + int rtm_use; /* deprecated use rtm_rmx->rmx_pksent */ #define rtm_fmask rtm_use /* bitmask used in RTM_CHANGE message */ u_long rtm_inits; /* which metrics we are initializing */ struct rt_metrics rtm_rmx; /* metrics themselves */ |