Page MenuHomeFreeBSD

D25595.1790752354.diff
No OneTemporary

Size
735 B
Referenced Files
None
Subscribers
None

D25595.1790752354.diff

Index: sys/net/route/nhop_ctl.c
===================================================================
--- sys/net/route/nhop_ctl.c
+++ sys/net/route/nhop_ctl.c
@@ -376,12 +376,16 @@
alter_nhop_from_info(struct nhop_object *nh, struct rt_addrinfo *info)
{
struct sockaddr *info_gw;
+ int a;
int error;
/* 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 */
+ a = nh->nh_priv->rt_flags & (RTF_BLACKHOLE | RTF_REJECT | RTF_GATEWAY);
+ if (a && (a & (a - 1)))
+ return (EINVAL);
/* Allow some flags (FLAG1,STATIC,BLACKHOLE,REJECT) to be toggled on change. */
nh->nh_priv->rt_flags &= ~RTF_FMASK;

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 30, 7:12 AM (6 m, 52 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30031452
Default Alt Text
D25595.1790752354.diff (735 B)

Event Timeline