Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173182806
D25595.id74216.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
670 B
Referenced Files
None
Subscribers
None
D25595.id74216.diff
View Options
Index: sys/net/route/nhop_ctl.c
===================================================================
--- sys/net/route/nhop_ctl.c
+++ sys/net/route/nhop_ctl.c
@@ -381,7 +381,11 @@
/* Update MTU if set in the request*/
set_nhop_mtu_from_info(nh, info);
- /* XXX: allow only one of BLACKHOLE,REJECT,GATEWAY */
+ /* allow only one of BLACKHOLE,REJECT,GATEWAY */
+ if (((nh->nh_priv->rt_flags & RTF_BLACKHOLE) != 0) +
+ ((nh->nh_priv->rt_flags & RTF_REJECT) != 0) +
+ ((nh->nh_priv->rt_flags & RTF_GATEWAY) != 0) > 1)
+ return (EINVAL);
/* Allow some flags (FLAG1,STATIC,BLACKHOLE,REJECT) to be toggled on change. */
nh->nh_priv->rt_flags &= ~RTF_FMASK;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 25, 3:58 AM (21 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39575854
Default Alt Text
D25595.id74216.diff (670 B)
Attached To
Mode
D25595: When modifying a route, only allow one of RTF_<BLACKHOLE,REJECT,GATEWAY> to be configured
Attached
Detach File
Event Timeline
Log In to Comment