21 Jul, 2018

1 commit

  • Pablo Neira Ayuso says:

    ====================
    Netfilter/IPVS updates for net-next

    The following patchset contains Netfilter/IPVS updates for your net-next
    tree:

    1) No need to set ttl from reject action for the bridge family, from
    Taehee Yoo.

    2) Use a fixed timeout for flow that are passed up from the flowtable
    to conntrack, from Florian Westphal.

    3) More preparation patches for tproxy support for nf_tables, from Mate
    Eckl.

    4) Remove unnecessary indirection in core IPv6 checksum function, from
    Florian Westphal.

    5) Use nf_ct_get_tuplepr() from openvswitch, instead of opencoding it.
    From Florian Westphal.

    6) socket match now selects socket infrastructure, instead of depending
    on it. From Mate Eckl.

    7) Patch series to simplify conntrack tuple building/parsing from packet
    path and ctnetlink, from Florian Westphal.

    8) Fetch timeout policy from protocol helpers, instead of doing it from
    core, from Florian Westphal.

    9) Merge IPv4 and IPv6 protocol trackers into conntrack core, from
    Florian Westphal.

    10) Depend on CONFIG_NF_TABLES_IPV6 and CONFIG_IP6_NF_IPTABLES
    respectively, instead of IPV6. Patch from Mate Eckl.

    11) Add specific function for garbage collection in conncount,
    from Yi-Hung Wei.

    12) Catch number of elements in the connlimit list, from Yi-Hung Wei.

    13) Move locking to nf_conncount, from Yi-Hung Wei.

    14) Series of patches to add lockless tree traversal in nf_conncount,
    from Yi-Hung Wei.

    15) Resolve clash in matching conntracks when race happens, from
    Martynas Pumputis.

    16) If connection entry times out, remove template entry from the
    ip_vs_conn_tab table to improve behaviour under flood, from
    Julian Anastasov.

    17) Remove useless parameter from nf_ct_helper_ext_add(), from Gao feng.

    18) Call abort from 2-phase commit protocol before requesting modules,
    make sure this is done under the mutex, from Florian Westphal.

    19) Grab module reference when starting transaction, also from Florian.

    20) Dynamically allocate expression info array for pre-parsing, from
    Florian.

    21) Add per netns mutex for nf_tables, from Florian Westphal.

    22) A couple of patches to simplify and refactor nf_osf code to prepare
    for nft_osf support.

    23) Break evaluation on missing socket, from Mate Eckl.

    24) Allow to match socket mark from nft_socket, from Mate Eckl.

    25) Remove dependency on nf_defrag_ipv6, now that IPv6 tracker is
    built-in into nf_conntrack. From Florian Westphal.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

16 Jul, 2018

1 commit


06 Jul, 2018

1 commit

  • This patch fixes a silent out-of-bound read possibility that was present
    because of the misuse of this function.

    Mostly it was called with a struct udphdr *hp which had only the udphdr
    part linearized by the skb_header_pointer, however
    nf_tproxy_get_sock_v{4,6} uses it as a tcphdr pointer, so some reads for
    tcp specific attributes may be invalid.

    Fixes: a583636a83ea ("inet: refactor inet[6]_lookup functions to take skb")
    Signed-off-by: Máté Eckl
    Signed-off-by: Pablo Neira Ayuso

    Máté Eckl
     

03 Jun, 2018

2 commits

  • The extracted functions will likely be usefull to implement tproxy
    support in nf_tables.

    Extrancted functions:
    - nf_tproxy_sk_is_transparent
    - nf_tproxy_laddr4
    - nf_tproxy_handle_time_wait4
    - nf_tproxy_get_sock_v4
    - nf_tproxy_laddr6
    - nf_tproxy_handle_time_wait6
    - nf_tproxy_get_sock_v6

    (nf_)tproxy_handle_time_wait6 also needed some refactor as its current
    implementation was xtables-specific.

    Signed-off-by: Máté Eckl
    Signed-off-by: Pablo Neira Ayuso

    Máté Eckl
     
  • There is a function in include/net/netfilter/nf_socket.h to decide if a
    socket has IP(V6)_TRANSPARENT socket option set or not. However this
    does the same as inet_sk_transparent() in include/net/tcp.h

    include/net/tcp.h:1733
    /* This helper checks if socket has IP_TRANSPARENT set */
    static inline bool inet_sk_transparent(const struct sock *sk)
    {
    switch (sk->sk_state) {
    case TCP_TIME_WAIT:
    return inet_twsk(sk)->tw_transparent;
    case TCP_NEW_SYN_RECV:
    return inet_rsk(inet_reqsk(sk))->no_srccheck;
    }
    return inet_sk(sk)->transparent;
    }

    tproxy_sk_is_transparent has also been refactored to use this function
    instead of reimplementing it.

    Signed-off-by: Máté Eckl
    Signed-off-by: Pablo Neira Ayuso

    Máté Eckl
     

15 Feb, 2018

1 commit


04 Sep, 2017

1 commit

  • Pablo Neira Ayuso says:

    ====================
    Netfilter updates for net-next

    The following patchset contains Netfilter updates for your net-next
    tree. Basically, updates to the conntrack core, enhancements for
    nf_tables, conversion of netfilter hooks from linked list to array to
    improve memory locality and asorted improvements for the Netfilter
    codebase. More specifically, they are:

    1) Add expection to hashes after timer initialization to prevent
    access from another CPU that walks on the hashes and calls
    del_timer(), from Florian Westphal.

    2) Don't update nf_tables chain counters from hot path, this is only
    used by the x_tables compatibility layer.

    3) Get rid of nested rcu_read_lock() calls from netfilter hook path.
    Hooks are always guaranteed to run from rcu read side, so remove
    nested rcu_read_lock() where possible. Patch from Taehee Yoo.

    4) nf_tables new ruleset generation notifications include PID and name
    of the process that has updated the ruleset, from Phil Sutter.

    5) Use skb_header_pointer() from nft_fib, so we can reuse this code from
    the nf_family netdev family. Patch from Pablo M. Bermudo.

    6) Add support for nft_fib in nf_tables netdev family, also from Pablo.

    7) Use deferrable workqueue for conntrack garbage collection, to reduce
    power consumption, from Patch from Subash Abhinov Kasiviswanathan.

    8) Add nf_ct_expect_iterate_net() helper and use it. From Florian
    Westphal.

    9) Call nf_ct_unconfirmed_destroy only from cttimeout, from Florian.

    10) Drop references on conntrack removal path when skbuffs has escaped via
    nfqueue, from Florian.

    11) Don't queue packets to nfqueue with dying conntrack, from Florian.

    12) Constify nf_hook_ops structure, from Florian.

    13) Remove neededlessly branch in nf_tables trace code, from Phil Sutter.

    14) Add nla_strdup(), from Phil Sutter.

    15) Rise nf_tables objects name size up to 255 chars, people want to use
    DNS names, so increase this according to what RFC 1035 specifies.
    Patch series from Phil Sutter.

    16) Kill nf_conntrack_default_on, it's broken. Default on conntrack hook
    registration on demand, suggested by Eric Dumazet, patch from Florian.

    17) Remove unused variables in compat_copy_entry_from_user both in
    ip_tables and arp_tables code. Patch from Taehee Yoo.

    18) Constify struct nf_conntrack_l4proto, from Julia Lawall.

    19) Constify nf_loginfo structure, also from Julia.

    20) Use a single rb root in connlimit, from Taehee Yoo.

    21) Remove unused netfilter_queue_init() prototype, from Taehee Yoo.

    22) Use audit_log() instead of open-coding it, from Geliang Tang.

    23) Allow to mangle tcp options via nft_exthdr, from Florian.

    24) Allow to fetch TCP MSS from nft_rt, from Florian. This includes
    a fix for a miscalculation of the minimal length.

    25) Simplify branch logic in h323 helper, from Nick Desaulniers.

    26) Calculate netlink attribute size for conntrack tuple at compile
    time, from Florian.

    27) Remove protocol name field from nf_conntrack_{l3,l4}proto structure.
    From Florian.

    28) Remove holes in nf_conntrack_l4proto structure, so it becomes
    smaller. From Florian.

    29) Get rid of print_tuple() indirection for /proc conntrack listing.
    Place all the code in net/netfilter/nf_conntrack_standalone.c.
    Patch from Florian.

    30) Do not built in print_conntrack() if CONFIG_NF_CONNTRACK_PROCFS is
    off. From Florian.

    31) Constify most nf_conntrack_{l3,l4}proto helper functions, from
    Florian.

    32) Fix broken indentation in ebtables extensions, from Colin Ian King.

    33) Fix several harmless sparse warning, from Florian.

    34) Convert netfilter hook infrastructure to use array for better memory
    locality, joint work done by Florian and Aaron Conole. Moreover, add
    some instrumentation to debug this.

    35) Batch nf_unregister_net_hooks() calls, to call synchronize_net once
    per batch, from Florian.

    36) Get rid of noisy logging in ICMPv6 conntrack helper, from Florian.

    37) Get rid of obsolete NFDEBUG() instrumentation, from Varsha Rao.

    38) Remove unused code in the generic protocol tracker, from Davide
    Caratti.

    I think I will have material for a second Netfilter batch in my queue if
    time allow to make it fit in this merge window.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

08 Aug, 2017

2 commits

  • Add a second device index, sdif, to inet6 socket lookups. sdif is the
    index for ingress devices enslaved to an l3mdev. It allows the lookups
    to consider the enslaved device as well as the L3 domain when searching
    for a socket.

    TCP moves the data in the cb. Prior to tcp_v4_rcv (e.g., early demux) the
    ingress index is obtained from IPCB using inet_sdif and after tcp_v4_rcv
    tcp_v4_sdif is used.

    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller

    David Ahern
     
  • Add a second device index, sdif, to inet socket lookups. sdif is the
    index for ingress devices enslaved to an l3mdev. It allows the lookups
    to consider the enslaved device as well as the L3 domain when searching
    for a socket.

    TCP moves the data in the cb. Prior to tcp_v4_rcv (e.g., early demux) the
    ingress index is obtained from IPCB using inet_sdif and after the cb move
    in tcp_v4_rcv the tcp_v4_sdif helper is used.

    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller

    David Ahern
     

24 Jul, 2017

1 commit

  • This patch removes duplicate rcu_read_lock().

    1. IPVS part:

    According to Julian Anastasov's mention, contexts of ipvs are described
    at: http://marc.info/?l=netfilter-devel&m=149562884514072&w=2, in summary:

    - packet RX/TX: does not need locks because packets come from hooks.
    - sync msg RX: backup server uses RCU locks while registering new
    connections.
    - ip_vs_ctl.c: configuration get/set, RCU locks needed.
    - xt_ipvs.c: It is a netfilter match, running from hook context.

    As result, rcu_read_lock and rcu_read_unlock can be removed from:

    - ip_vs_core.c: all
    - ip_vs_ctl.c:
    - only from ip_vs_has_real_service
    - ip_vs_ftp.c: all
    - ip_vs_proto_sctp.c: all
    - ip_vs_proto_tcp.c: all
    - ip_vs_proto_udp.c: all
    - ip_vs_xmit.c: all (contains only packet processing)

    2. Netfilter part:

    There are three types of functions that are guaranteed the rcu_read_lock().
    First, as result, functions are only called by nf_hook():

    - nf_conntrack_broadcast_help(), pptp_expectfn(), set_expected_rtp_rtcp().
    - tcpmss_reverse_mtu(), tproxy_laddr4(), tproxy_laddr6().
    - match_lookup_rt6(), check_hlist(), hashlimit_mt_common().
    - xt_osf_match_packet().

    Second, functions that caller already held the rcu_read_lock().
    - destroy_conntrack(), ctnetlink_conntrack_event().
    - ctnl_timeout_find_get(), nfqnl_nf_hook_drop().

    Third, functions that are mixed with type1 and type2.

    These functions are called by nf_hook() also these are called by
    ordinary functions that already held the rcu_read_lock():

    - __ctnetlink_glue_build(), ctnetlink_expect_event().
    - ctnetlink_proto_size().

    Applied files are below:

    - nf_conntrack_broadcast.c, nf_conntrack_core.c, nf_conntrack_netlink.c.
    - nf_conntrack_pptp.c, nf_conntrack_sip.c, nfnetlink_cttimeout.c.
    - nfnetlink_queue.c, xt_TCPMSS.c, xt_TPROXY.c, xt_addrtype.c.
    - xt_connlimit.c, xt_hashlimit.c, xt_osf.c

    Detailed calltrace can be found at:
    http://marc.info/?l=netfilter-devel&m=149667610710350&w=2

    Signed-off-by: Taehee Yoo
    Acked-by: Julian Anastasov
    Signed-off-by: Pablo Neira Ayuso

    Taehee Yoo
     

01 Jul, 2017

1 commit

  • refcount_t type and corresponding API should be
    used instead of atomic_t when the variable is used as
    a reference counter. This allows to avoid accidental
    refcounter overflows that might lead to use-after-free
    situations.

    This patch uses refcount_inc_not_zero() instead of
    atomic_inc_not_zero_hint() due to absense of a _hint()
    version of refcount API. If the hint() version must
    be used, we might need to revisit API.

    Signed-off-by: Elena Reshetova
    Signed-off-by: Hans Liljestrand
    Signed-off-by: Kees Cook
    Signed-off-by: David Windsor
    Signed-off-by: David S. Miller

    Reshetova, Elena
     

09 Apr, 2017

1 commit


07 Dec, 2016

1 commit

  • nf_defrag modules for ipv4 and ipv6 export an empty stub function.
    Any module that needs the defragmentation hooks registered simply 'calls'
    this empty function to create a phony module dependency -- modprobe will
    then load the defrag module too.

    This extends netfilter ipv4/ipv6 defragmentation modules to delay the hook
    registration until the functionality is requested within a network namespace
    instead of module load time for all namespaces.

    Hooks are only un-registered on module unload or when a namespace that used
    such defrag functionality exits.

    We have to use struct net for this as the register hooks can be called
    before netns initialization here from the ipv4/ipv6 conntrack module
    init path.

    There is no unregister functionality support, defrag will always be
    active once it was requested inside a net namespace.

    The reason is that defrag has impact on nft and iptables rulesets
    (without defrag we might see framents).

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

    Florian Westphal
     

03 Nov, 2016

1 commit


18 Aug, 2016

1 commit

  • inet_lookup_listener() and inet6_lookup_listener() no longer
    take a reference on the found listener.

    This minimal patch adds back the refcounting, but we might do
    this differently in net-next later.

    Fixes: 3b24d854cb35 ("tcp/dccp: do not touch listener sk_refcnt under synflood")
    Reported-and-tested-by: Denys Fedoryshchenko
    Signed-off-by: Eric Dumazet
    Signed-off-by: Pablo Neira Ayuso

    Eric Dumazet
     

11 Feb, 2016

1 commit

  • This is a preliminary step to allow fast socket lookup of SO_REUSEPORT
    groups. Doing so with a BPF filter will require access to the
    skb in question. This change plumbs the skb (and offset to payload
    data) through the call stack to the listening socket lookup
    implementations where it will be used in a following patch.

    Signed-off-by: Craig Gallek
    Signed-off-by: David S. Miller

    Craig Gallek
     

19 Sep, 2015

1 commit


10 Jul, 2015

1 commit

  • inet_twsk_deschedule() calls are followed by inet_twsk_put().

    Only particular case is in inet_twsk_purge() but there is no point
    to defer the inet_twsk_put() after re-enabling BH.

    Lets rename inet_twsk_deschedule() to inet_twsk_deschedule_put()
    and move the inet_twsk_put() inside.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

14 Apr, 2015

1 commit

  • Using a timer wheel for timewait sockets was nice ~15 years ago when
    memory was expensive and machines had a single processor.

    This does not scale, code is ugly and source of huge latencies
    (Typically 30 ms have been seen, cpus spinning on death_lock spinlock.)

    We can afford to use an extra 64 bytes per timewait sock and spread
    timewait load to all cpus to have better behavior.

    Tested:

    On following test, /proc/sys/net/ipv4/tcp_tw_recycle is set to 1
    on the target (lpaa24)

    Before patch :

    lpaa23:~# ./super_netperf 200 -H lpaa24 -t TCP_CC -l 60 -- -p0,0
    419594

    lpaa23:~# ./super_netperf 200 -H lpaa24 -t TCP_CC -l 60 -- -p0,0
    437171

    While test is running, we can observe 25 or even 33 ms latencies.

    lpaa24:~# ping -c 1000 -i 0.02 -qn lpaa23
    ...
    1000 packets transmitted, 1000 received, 0% packet loss, time 20601ms
    rtt min/avg/max/mdev = 0.020/0.217/25.771/1.535 ms, pipe 2

    lpaa24:~# ping -c 1000 -i 0.02 -qn lpaa23
    ...
    1000 packets transmitted, 1000 received, 0% packet loss, time 20702ms
    rtt min/avg/max/mdev = 0.019/0.183/33.761/1.441 ms, pipe 2

    After patch :

    About 90% increase of throughput :

    lpaa23:~# ./super_netperf 200 -H lpaa24 -t TCP_CC -l 60 -- -p0,0
    810442

    lpaa23:~# ./super_netperf 200 -H lpaa24 -t TCP_CC -l 60 -- -p0,0
    800992

    And latencies are kept to minimal values during this load, even
    if network utilization is 90% higher :

    lpaa24:~# ping -c 1000 -i 0.02 -qn lpaa23
    ...
    1000 packets transmitted, 1000 received, 0% packet loss, time 19991ms
    rtt min/avg/max/mdev = 0.023/0.064/0.360/0.042 ms

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

24 Mar, 2015

1 commit


20 Mar, 2015

1 commit


18 Mar, 2015

1 commit


09 Oct, 2013

1 commit

  • TCP listener refactoring, part 4 :

    To speed up inet lookups, we moved IPv4 addresses from inet to struct
    sock_common

    Now is time to do the same for IPv6, because it permits us to have fast
    lookups for all kind of sockets, including upcoming SYN_RECV.

    Getting IPv6 addresses in TCP lookups currently requires two extra cache
    lines, plus a dereference (and memory stall).

    inet6_sk(sk) does the dereference of inet_sk(__sk)->pinet6

    This patch is way bigger than its IPv4 counter part, because for IPv4,
    we could add aliases (inet_daddr, inet_rcv_saddr), while on IPv6,
    it's not doable easily.

    inet6_sk(sk)->daddr becomes sk->sk_v6_daddr
    inet6_sk(sk)->rcv_saddr becomes sk->sk_v6_rcv_saddr

    And timewait socket also have tw->tw_v6_daddr & tw->tw_v6_rcv_saddr
    at the same offset.

    We get rid of INET6_TW_MATCH() as INET6_MATCH() is now the generic
    macro.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

05 Aug, 2013

1 commit

  • after commit 93742cf (netfilter: tproxy: remove nf_tproxy_core.h)

    CONFIG_IPV6=y
    CONFIG_IP6_NF_IPTABLES=n

    gives us:

    net/netfilter/xt_TPROXY.c: In function 'nf_tproxy_get_sock_v6':
    net/netfilter/xt_TPROXY.c:178:4: error: implicit declaration of function 'inet6_lookup_listener'

    Reported-by: kbuild test robot
    Signed-off-by: Florian Westphal
    Signed-off-by: Pablo Neira Ayuso

    Florian Westphal
     

01 Aug, 2013

1 commit


31 Jul, 2013

1 commit

  • The module was "permanent", due to the special tproxy skb->destructor.
    Nowadays we have tcp early demux and its sock_edemux destructor in
    networking core which can be used instead.

    Thanks to early demux changes the input path now also handles
    "skb->sk is tw socket" correctly, so this no longer needs the special
    handling introduced with commit d503b30bd648b3cb4e5f50b65d27e389960cc6d9
    (netfilter: tproxy: do not assign timewait sockets to skb->sk).

    Thus:
    - move assign_sock function to where its needed
    - don't prevent timewait sockets from being assigned to the skb
    - remove nf_tproxy_core.

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

    Florian Westphal
     

11 Jul, 2012

1 commit


09 May, 2012

1 commit

  • This patch adds the flags parameter to ipv6_find_hdr. This flags
    allows us to:

    * know if this is a fragment.
    * stop at the AH header, so the information contained in that header
    can be used for some specific packet handling.

    This patch also adds the offset parameter for inspection of one
    inner IPv6 header that is contained in error messages.

    Signed-off-by: Hans Schillstrom
    Signed-off-by: Pablo Neira Ayuso

    Hans Schillstrom
     

17 Dec, 2011

1 commit


17 Feb, 2011

1 commit

  • Assigning a socket in timewait state to skb->sk can trigger
    kernel oops, e.g. in nfnetlink_log, which does:

    if (skb->sk) {
    read_lock_bh(&skb->sk->sk_callback_lock);
    if (skb->sk->sk_socket && skb->sk->sk_socket->file) ...

    in the timewait case, accessing sk->sk_callback_lock and sk->sk_socket
    is invalid.

    Either all of these spots will need to add a test for sk->sk_state != TCP_TIME_WAIT,
    or xt_TPROXY must not assign a timewait socket to skb->sk.

    This does the latter.

    If a TW socket is found, assign the tproxy nfmark, but skip the skb->sk assignment,
    thus mimicking behaviour of a '-m socket .. -j MARK/ACCEPT' re-routing rule.

    The 'SYN to TW socket' case is left unchanged -- we try to redirect to the
    listener socket.

    Cc: Balazs Scheidler
    Cc: KOVACS Krisztian
    Signed-off-by: Florian Westphal
    Signed-off-by: Patrick McHardy

    Florian Westphal
     

26 Oct, 2010

1 commit

  • One of the previous tproxy related patches split IPv6 defragmentation and
    connection tracking, but did not correctly add Kconfig stanzas to handle the
    new dependencies correctly. This patch fixes that by making the config options
    mirror the setup we have for IPv4: a distinct config option for defragmentation
    that is automatically selected by both connection tracking and
    xt_TPROXY/xt_socket.

    The patch also changes the #ifdefs enclosing IPv6 specific code in xt_socket
    and xt_TPROXY: we only compile these in case we have ip6tables support enabled.

    Signed-off-by: KOVACS Krisztian
    Signed-off-by: David S. Miller

    KOVACS Krisztian
     

21 Oct, 2010

3 commits

  • The REDIRECT target and the older TProxy versions used the primary address
    of the incoming interface as the default value of the --on-ip parameter.
    This was unintentionally changed during the initial TProxy submission and
    caused confusion among users.

    Since IPv6 has no notion of primary address, we just select the first address
    on the list: this way the socket lookup finds wildcard bound sockets
    properly and we cannot really do better without the user telling us the
    IPv6 address of the proxy.

    This is implemented for both IPv4 and IPv6.

    Signed-off-by: Balazs Scheidler
    Signed-off-by: KOVACS Krisztian
    Signed-off-by: Patrick McHardy

    Balazs Scheidler
     
  • This requires a new revision as the old target structure was
    IPv4 specific.

    Signed-off-by: Balazs Scheidler
    Signed-off-by: KOVACS Krisztian
    Signed-off-by: Patrick McHardy

    Balazs Scheidler
     
  • Without tproxy redirections an incoming SYN kicks out conflicting
    TIME_WAIT sockets, in order to handle clients that reuse ports
    within the TIME_WAIT period.

    The same mechanism didn't work in case TProxy is involved in finding
    the proper socket, as the time_wait processing code looked up the
    listening socket assuming that the listener addr/port matches those
    of the established connection.

    This is not the case with TProxy as the listener addr/port is possibly
    changed with the tproxy rule.

    Signed-off-by: Balazs Scheidler
    Signed-off-by: KOVACS Krisztian
    Signed-off-by: Patrick McHardy

    Balazs Scheidler
     

17 Sep, 2010

1 commit


09 Jul, 2010

1 commit


12 May, 2010

1 commit


25 Mar, 2010

3 commits

  • Part of the transition of done by this semantic patch:
    //
    @ rule1 @
    struct xt_target ops;
    identifier check;
    @@
    ops.checkentry = check;

    @@
    identifier rule1.check;
    @@
    check(...) { }

    @@
    identifier rule1.check;
    @@
    check(...) { }
    //

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt
     
  • Restore function signatures from bool to int so that we can report
    memory allocation failures or similar using -ENOMEM rather than
    always having to pass -EINVAL back.

    //
    @@
    type bool;
    identifier check, par;
    @@
    -bool check
    +int check
    (struct xt_tgchk_param *par) { ... }
    //

    Minus the change it does to xt_ct_find_proto.

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt
     
  • Supplement to 1159683ef48469de71dc26f0ee1a9c30d131cf89.

    Downgrade the log level to INFO for most checkentry messages as they
    are, IMO, just an extra information to the -EINVAL code that is
    returned as part of a parameter "constraint violation". Leave errors
    to real errors, such as being unable to create a LED trigger.

    Signed-off-by: Jan Engelhardt

    Jan Engelhardt