Commit 3cf50294 authored by Harald Welte's avatar Harald Welte Committed by David S. Miller

[NETFILTER]: Use u16 for port numbers.

parent e64931d2
...@@ -101,7 +101,7 @@ static int amanda_data_fixup(struct ip_conntrack *ct, ...@@ -101,7 +101,7 @@ static int amanda_data_fixup(struct ip_conntrack *ct,
struct ip_conntrack_expect *exp = expect; struct ip_conntrack_expect *exp = expect;
struct ip_ct_amanda_expect *ct_amanda_info = &exp->help.exp_amanda_info; struct ip_ct_amanda_expect *ct_amanda_info = &exp->help.exp_amanda_info;
struct ip_conntrack_tuple t = exp->tuple; struct ip_conntrack_tuple t = exp->tuple;
int port; u_int16_t port;
MUST_BE_LOCKED(&ip_amanda_lock); MUST_BE_LOCKED(&ip_amanda_lock);
...@@ -115,7 +115,7 @@ static int amanda_data_fixup(struct ip_conntrack *ct, ...@@ -115,7 +115,7 @@ static int amanda_data_fixup(struct ip_conntrack *ct,
writable */ writable */
t.dst.ip = newip; t.dst.ip = newip;
for (port = ct_amanda_info->port + 10; port != 0; port++) { for (port = ct_amanda_info->port; port != 0; port++) {
t.dst.u.tcp.port = htons(port); t.dst.u.tcp.port = htons(port);
if (ip_conntrack_change_expect(exp, &t) == 0) if (ip_conntrack_change_expect(exp, &t) == 0)
break; break;
......
...@@ -99,7 +99,7 @@ static int irc_data_fixup(const struct ip_ct_irc_expect *ct_irc_info, ...@@ -99,7 +99,7 @@ static int irc_data_fixup(const struct ip_ct_irc_expect *ct_irc_info,
struct ip_conntrack_tuple t; struct ip_conntrack_tuple t;
struct iphdr *iph = (*pskb)->nh.iph; struct iphdr *iph = (*pskb)->nh.iph;
struct tcphdr *tcph = (void *) iph + iph->ihl * 4; struct tcphdr *tcph = (void *) iph + iph->ihl * 4;
int port; u_int16_t port;
/* "4294967296 65635 " */ /* "4294967296 65635 " */
char buffer[18]; char buffer[18];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment