mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
netfilter: nf_conntrack: add SCTP support for SO_ORIGINAL_DST
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
bbd8a0d3a3
commit
549812799c
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue