diff options
author | Rafael Laufer <rlaufer@cs.ucla.edu> | 2009-08-10 10:08:27 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-08-10 10:08:27 +0200 |
commit | 549812799c8495451e71ebd9f6a862b33120a35a (patch) | |
tree | 5c3f173e5901f88bd3cffb99ac36191aa5d0b3d1 /net/ipv4 | |
parent | net: Avoid enqueuing skb for default qdiscs (diff) | |
download | linux-549812799c8495451e71ebd9f6a862b33120a35a.tar.xz linux-549812799c8495451e71ebd9f6a862b33120a35a.zip |
netfilter: nf_conntrack: add SCTP support for SO_ORIGINAL_DST
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 7d2ead7228ac..05a9bc8df536 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c @@ -256,11 +256,11 @@ getorigdst(struct sock *sk, int optval, void __user *user, int *len) tuple.dst.u3.ip = inet->daddr; tuple.dst.u.tcp.port = inet->dport; tuple.src.l3num = PF_INET; - tuple.dst.protonum = IPPROTO_TCP; + tuple.dst.protonum = sk->sk_protocol; - /* We only do TCP at the moment: is there a better way? */ - if (strcmp(sk->sk_prot->name, "TCP")) { - pr_debug("SO_ORIGINAL_DST: Not a TCP socket\n"); + /* We only do TCP and SCTP at the moment: is there a better way? */ + if (sk->sk_protocol != IPPROTO_TCP && sk->sk_protocol != IPPROTO_SCTP) { + pr_debug("SO_ORIGINAL_DST: Not a TCP/SCTP socket\n"); return -ENOPROTOOPT; } |