1. 28 Jan, 2019 5 commits
  2. 22 Jan, 2019 2 commits
    • Florian Westphal's avatar
      netfilter: conntrack: fix bogus port values for other l4 protocols · e2f7cc72
      Florian Westphal authored
      We must only extract l4 proto information if we can track the layer 4
      protocol.
      
      Before removal of pkt_to_tuple callback, the code to extract port
      information was only reached for TCP/UDP/LITE/DCCP/SCTP.
      
      The other protocols were handled by the indirect call, and the
      'generic' tracker took care of other protocols that have no notion
      of 'ports'.
      
      After removal of the callback we must be more strict here and only
      init port numbers for those protocols that have ports.
      
      Fixes: df5e1629 ("netfilter: conntrack: remove pkt_to_tuple callback")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      e2f7cc72
    • Florian Westphal's avatar
      netfilter: conntrack: fix IPV6=n builds · 81e01647
      Florian Westphal authored
      Stephen Rothwell reports:
       After merging the netfilter-next tree, today's linux-next build
       (powerpc ppc64_defconfig) failed like this:
      
       ERROR: "nf_conntrack_invert_icmpv6_tuple" [nf_conntrack.ko] undefined!
       ERROR: "nf_conntrack_icmpv6_packet" [nf_conntrack.ko] undefined!
       ERROR: "nf_conntrack_icmpv6_init_net" [nf_conntrack.ko] undefined!
       ERROR: "icmpv6_pkt_to_tuple" [nf_conntrack.ko] undefined!
       ERROR: "nf_ct_gre_keymap_destroy" [nf_conntrack.ko] undefined!
      
      icmpv6 related errors are due to lack of IS_ENABLED(CONFIG_IPV6) (no
      icmpv6 support is builtin if kernel has CONFIG_IPV6=n), the
      nf_ct_gre_keymap_destroy error is due to lack of PROTO_GRE check.
      
      Fixes: a47c5404 ("netfilter: conntrack: handle builtin l4proto packet functions via direct calls")
      Fixes: e2e48b47 ("netfilter: conntrack: handle icmp pkt_to_tuple helper via direct calls")
      Fixes: 197c4300 ("netfilter: conntrack: remove invert_tuple callback")
      Fixes: 2a389de8 ("netfilter: conntrack: remove l4proto init and get_net callbacks")
      Fixes: e5689435 ("netfilter: conntrack: remove l4proto destroy hook")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      81e01647
  3. 18 Jan, 2019 33 commits