X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=system-linux.c;h=6dc9acd82db704573a54a4ca53cd43ee722e7a1b;hb=3653d721dad44c5a63790a3fd67e819dfb1dc428;hp=a6dde59c5b90ce0cf44f3aed2ccc165595cff2b3;hpb=3204adab41de155959575eb4d3a415ea947b861f;p=project%2Fnetifd.git diff --git a/system-linux.c b/system-linux.c index a6dde59..6dc9acd 100644 --- a/system-linux.c +++ b/system-linux.c @@ -48,6 +48,15 @@ #define RT_TABLE_PRELOCAL 128 #endif +#ifndef IFA_F_NOPREFIXROUTE +#define IFA_F_NOPREFIXROUTE 0x200 +#endif + +#ifndef IFA_FLAGS +#define IFA_FLAGS (IFA_MULTICAST + 1) +#endif + + #include #include #include @@ -782,6 +791,7 @@ sec_to_jiffies(int val) int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg) { + char buf[64]; unsigned long args[4] = {}; if (ioctl(sock_ioctl, SIOCBRADDBR, bridge->ifname) < 0) @@ -801,6 +811,10 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg) system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier", bridge->ifname, cfg->multicast_querier ? "1" : "0"); + snprintf(buf, sizeof(buf), "%i", cfg->hash_max); + system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/hash_max", + bridge->ifname, buf); + args[0] = BRCTL_SET_BRIDGE_PRIORITY; args[1] = cfg->priority; system_bridge_if(bridge->ifname, NULL, SIOCDEVPRIVATE, &args);