29 Aug, 2017

1 commit


28 Aug, 2017

1 commit

  • net/netfilter/nft_payload.c:187:18: warning: incorrect type in return expression (expected bool got restricted __sum16 [usertype] check)
    net/netfilter/nft_exthdr.c:222:14: warning: cast to restricted __be32
    net/netfilter/nft_rt.c:49:23: warning: incorrect type in assignment (different base types expected unsigned int got restricted __be32)
    net/netfilter/nft_rt.c:70:25: warning: symbol 'nft_rt_policy' was not declared. Should it be static?

    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     

19 Aug, 2017

1 commit


29 May, 2017

1 commit

  • Resolves warnings:
    net/netfilter/nft_rt.c:26:6: warning: no previous prototype for ‘nft_rt_get_eval’ [-Wmissing-prototypes]
    net/netfilter/nft_rt.c:75:5: warning: no previous prototype for ‘nft_rt_get_init’ [-Wmissing-prototypes]
    net/netfilter/nft_rt.c:106:5: warning: no previous prototype for ‘nft_rt_get_dump’ [-Wmissing-prototypes]

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Pablo Neira Ayuso

    stephen hemminger
     

03 Nov, 2016

1 commit


02 Nov, 2016

1 commit

  • Introduces an nftables rt expression for routing related data with support
    for nexthop (i.e. the directly connected IP address that an outgoing packet
    is sent to), which can be used either for matching or accounting, eg.

    # nft add rule filter postrouting \
    ip daddr 192.168.1.0/24 rt nexthop != 192.168.0.1 drop

    This will drop any traffic to 192.168.1.0/24 that is not routed via
    192.168.0.1.

    # nft add rule filter postrouting \
    flow table acct { rt nexthop timeout 600s counter }
    # nft add rule ip6 filter postrouting \
    flow table acct { rt nexthop timeout 600s counter }

    These rules count outgoing traffic per nexthop. Note that the timeout
    releases an entry if no traffic is seen for this nexthop within 10 minutes.

    # nft add rule inet filter postrouting \
    ether type ip \
    flow table acct { rt nexthop timeout 600s counter }
    # nft add rule inet filter postrouting \
    ether type ip6 \
    flow table acct { rt nexthop timeout 600s counter }

    Same as above, but via the inet family, where the ether type must be
    specified explicitly.

    "rt classid" is also implemented identical to "meta rtclassid", since it
    is more logical to have this match in the routing expression going forward.

    Signed-off-by: Anders K. Pedersen
    Signed-off-by: Pablo Neira Ayuso

    Anders K. Pedersen