diff options
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_netlink.c | 8 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 3d277aa869dd..d5d2efddba57 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -945,9 +945,11 @@ ctnetlink_create_conntrack(struct nfattr *cda[], | |||
945 | ct->timeout.expires = jiffies + ct->timeout.expires * HZ; | 945 | ct->timeout.expires = jiffies + ct->timeout.expires * HZ; |
946 | ct->status |= IPS_CONFIRMED; | 946 | ct->status |= IPS_CONFIRMED; |
947 | 947 | ||
948 | err = ctnetlink_change_status(ct, cda); | 948 | if (cda[CTA_STATUS-1]) { |
949 | if (err < 0) | 949 | err = ctnetlink_change_status(ct, cda); |
950 | goto err; | 950 | if (err < 0) |
951 | goto err; | ||
952 | } | ||
951 | 953 | ||
952 | if (cda[CTA_PROTOINFO-1]) { | 954 | if (cda[CTA_PROTOINFO-1]) { |
953 | err = ctnetlink_change_protoinfo(ct, cda); | 955 | err = ctnetlink_change_protoinfo(ct, cda); |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 7357b8f47acd..ba77183be2f3 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -963,9 +963,11 @@ ctnetlink_create_conntrack(struct nfattr *cda[], | |||
963 | ct->timeout.expires = jiffies + ct->timeout.expires * HZ; | 963 | ct->timeout.expires = jiffies + ct->timeout.expires * HZ; |
964 | ct->status |= IPS_CONFIRMED; | 964 | ct->status |= IPS_CONFIRMED; |
965 | 965 | ||
966 | err = ctnetlink_change_status(ct, cda); | 966 | if (cda[CTA_STATUS-1]) { |
967 | if (err < 0) | 967 | err = ctnetlink_change_status(ct, cda); |
968 | goto err; | 968 | if (err < 0) |
969 | goto err; | ||
970 | } | ||
969 | 971 | ||
970 | if (cda[CTA_PROTOINFO-1]) { | 972 | if (cda[CTA_PROTOINFO-1]) { |
971 | err = ctnetlink_change_protoinfo(ct, cda); | 973 | err = ctnetlink_change_protoinfo(ct, cda); |