[LEDE-DEV] [PATCH] netifd-proto.sh: add ip4table & ip6table to `proto_add_dynamic_defaults()`
Baptiste Jonglez
baptiste at bitsofnetworks.org
Sat Sep 9 12:51:16 PDT 2017
On 09-09-17, Baptiste Jonglez wrote:
> On 05-09-17, Alexandru Ardelean wrote:
> > The `proto_add_dynamic_defaults()` seems to be called mostly
> > in the context of LTE/3G modems (via wwan, qmi, etc) setup.
> >
> > When they get setup, these devices override default routes.
> >
> > However, depending on setup, we want these modems to
> > be part of a another routing table.
> > This change allows that.
> >
> > ip4table/ip6table are of string type in netifd to allow
> > for `default`, `local` routing table names to be specified.
>
> Just a remark on the names: "ip4table" and "ip6table" make it looks like
> it's related to firewall. But this has nothing to do with firewalls.
>
> Maybe use "routingtable" and "routingtablev6" instead? Or just
> "table"/"tablev6"?
It seems that "ip4table" and "ip6table" is already understood by other
protocols, so you can disregard my remark:
https://wiki.openwrt.org/doc/uci/network#options_valid_for_all_protocol_types
> > Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
> > ---
> > scripts/netifd-proto.sh | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/scripts/netifd-proto.sh b/scripts/netifd-proto.sh
> > index cc7031a..fd7b596 100644
> > --- a/scripts/netifd-proto.sh
> > +++ b/scripts/netifd-proto.sh
> > @@ -26,6 +26,8 @@ proto_add_dynamic_defaults() {
> > [ -n "$defaultroute" ] && json_add_boolean defaultroute "$defaultroute"
> > [ -n "$peerdns" ] && json_add_boolean peerdns "$peerdns"
> > [ -n "$metric" ] && json_add_int metric "$metric"
> > + [ -n "$ip4table" ] && json_add_string ip4table "$ip4table"
> > + [ -n "$ip6table" ] && json_add_string ip6table "$ip6table"
> > }
> >
> > _proto_do_teardown() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170909/254774db/attachment.sig>
More information about the Lede-dev
mailing list