30 Jun, 2014

1 commit

  • replace:
    #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
    with
    #if IS_ENABLED(CONFIG_NF_CT_NETLINK)

    replace:
    #if !defined(CONFIG_NF_NAT) && !defined(CONFIG_NF_NAT_MODULE)
    with
    #if !IS_ENABLED(CONFIG_NF_NAT)

    replace:
    #if !defined(CONFIG_NF_CONNTRACK) && !defined(CONFIG_NF_CONNTRACK_MODULE)
    with
    #if !IS_ENABLED(CONFIG_NF_CONNTRACK)

    And add missing:
    IS_ENABLED(CONFIG_NF_CT_NETLINK)

    in net/ipv{4,6}/netfilter/nf_nat_l3proto_ipv{4,6}.c

    Signed-off-by: Duan Jiong
    Signed-off-by: Pablo Neira Ayuso

    Duan Jiong
     

28 Jul, 2013

1 commit


30 Apr, 2013

1 commit

  • Change the type of the crc32 parameter of sctp_end_cksum()
    from __be32 to __u32 to reflect that fact that it is passed
    to cpu_to_le32().

    There are five in-tree users of sctp_end_cksum().
    The following four had warnings flagged by sparse which are
    no longer present with this change.

    net/netfilter/ipvs/ip_vs_proto_sctp.c:sctp_nat_csum()
    net/netfilter/ipvs/ip_vs_proto_sctp.c:sctp_csum_check()
    net/sctp/input.c:sctp_rcv_checksum()
    net/sctp/output.c:sctp_packet_transmit()

    The fifth user is net/netfilter/nf_nat_proto_sctp.c:sctp_manip_pkt().
    It has been updated to pass a __u32 instead of a __be32,
    the value in question was already calculated in cpu byte-order.

    net/netfilter/nf_nat_proto_sctp.c:sctp_manip_pkt() has also
    been updated to assign the return value of sctp_end_cksum()
    directly to a variable of type __le32, matching the
    type of the return value. Previously the return value
    was assigned to a variable of type __be32 and then that variable
    was finally assigned to another variable of type __le32.

    Problems flagged by sparse.
    Compile and sparse tested only.

    Signed-off-by: Simon Horman
    Signed-off-by: Pablo Neira Ayuso

    Simon Horman
     

30 Aug, 2012

1 commit