diff options
author | Steven Barth <steven@midlink.org> | 2013-06-10 10:01:20 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-06-10 10:01:20 +0200 |
commit | dfb67585561ccd9bf735cfc5d5fba8401ca270c5 (patch) | |
tree | a321e077096b0e3b9e7a9ac4eef94d3b2731da78 /interface.c | |
parent | dc7ba66de87c2f624e906238e5a74b03da7c3b46 (diff) |
Reuse automatic ip6table value
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/interface.c b/interface.c index a697326..30e48cf 100644 --- a/interface.c +++ b/interface.c @@ -588,8 +588,12 @@ interface_init(struct interface *iface, const char *name, } // Set a default exteranl routing table for IPv6 to do source-based-filtering + struct interface *iface_old = vlist_find(&interfaces, name, iface_old, node); + if (iface_old && iface_old->ip6table > 1000 && iface_old->ip6table < 2000) + iface->ip6table = iface_old->ip6table; + else + iface->ip6table = 1000 + ++interface_serial; - iface->ip6table = 1000 + ++interface_serial; if ((cur = tb[IFACE_ATTR_IP6TABLE])) { if (!system_resolve_rt_table(blobmsg_data(cur), &iface->ip6table)) DPRINTF("Failed to resolve routing table: %s\n", (char *) blobmsg_data(cur)); |