diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-28 17:22:51 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:03:03 -0400 |
commit | d4263cde88d3fee2af0aac8836bb785cdb6b06c0 (patch) | |
tree | f9d7720ebc7211cf479c0271a4de0d256562edcd /net/ipv4 | |
parent | 6a19d61472d0802a24493c0d200e88f99ad39cd8 (diff) |
[NETFILTER]: h323 annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_h323.c | 84 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_nat_helper_h323.c | 16 |
2 files changed, 50 insertions, 50 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c index 9a39e2969712..7b7441202bfd 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c | |||
@@ -49,11 +49,11 @@ MODULE_PARM_DESC(callforward_filter, "only create call forwarding expectations " | |||
49 | int (*set_h245_addr_hook) (struct sk_buff ** pskb, | 49 | int (*set_h245_addr_hook) (struct sk_buff ** pskb, |
50 | unsigned char **data, int dataoff, | 50 | unsigned char **data, int dataoff, |
51 | H245_TransportAddress * addr, | 51 | H245_TransportAddress * addr, |
52 | u_int32_t ip, u_int16_t port); | 52 | __be32 ip, u_int16_t port); |
53 | int (*set_h225_addr_hook) (struct sk_buff ** pskb, | 53 | int (*set_h225_addr_hook) (struct sk_buff ** pskb, |
54 | unsigned char **data, int dataoff, | 54 | unsigned char **data, int dataoff, |
55 | TransportAddress * addr, | 55 | TransportAddress * addr, |
56 | u_int32_t ip, u_int16_t port); | 56 | __be32 ip, u_int16_t port); |
57 | int (*set_sig_addr_hook) (struct sk_buff ** pskb, | 57 | int (*set_sig_addr_hook) (struct sk_buff ** pskb, |
58 | struct ip_conntrack * ct, | 58 | struct ip_conntrack * ct, |
59 | enum ip_conntrack_info ctinfo, | 59 | enum ip_conntrack_info ctinfo, |
@@ -209,7 +209,7 @@ static int get_tpkt_data(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
209 | 209 | ||
210 | /****************************************************************************/ | 210 | /****************************************************************************/ |
211 | static int get_h245_addr(unsigned char *data, H245_TransportAddress * addr, | 211 | static int get_h245_addr(unsigned char *data, H245_TransportAddress * addr, |
212 | u_int32_t * ip, u_int16_t * port) | 212 | __be32 * ip, u_int16_t * port) |
213 | { | 213 | { |
214 | unsigned char *p; | 214 | unsigned char *p; |
215 | 215 | ||
@@ -232,7 +232,7 @@ static int expect_rtp_rtcp(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
232 | { | 232 | { |
233 | int dir = CTINFO2DIR(ctinfo); | 233 | int dir = CTINFO2DIR(ctinfo); |
234 | int ret = 0; | 234 | int ret = 0; |
235 | u_int32_t ip; | 235 | __be32 ip; |
236 | u_int16_t port; | 236 | u_int16_t port; |
237 | u_int16_t rtp_port; | 237 | u_int16_t rtp_port; |
238 | struct ip_conntrack_expect *rtp_exp; | 238 | struct ip_conntrack_expect *rtp_exp; |
@@ -254,10 +254,10 @@ static int expect_rtp_rtcp(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
254 | rtp_exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; | 254 | rtp_exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; |
255 | rtp_exp->tuple.dst.u.udp.port = htons(rtp_port); | 255 | rtp_exp->tuple.dst.u.udp.port = htons(rtp_port); |
256 | rtp_exp->tuple.dst.protonum = IPPROTO_UDP; | 256 | rtp_exp->tuple.dst.protonum = IPPROTO_UDP; |
257 | rtp_exp->mask.src.ip = 0xFFFFFFFF; | 257 | rtp_exp->mask.src.ip = htonl(0xFFFFFFFF); |
258 | rtp_exp->mask.src.u.udp.port = 0; | 258 | rtp_exp->mask.src.u.udp.port = 0; |
259 | rtp_exp->mask.dst.ip = 0xFFFFFFFF; | 259 | rtp_exp->mask.dst.ip = htonl(0xFFFFFFFF); |
260 | rtp_exp->mask.dst.u.udp.port = 0xFFFF; | 260 | rtp_exp->mask.dst.u.udp.port = htons(0xFFFF); |
261 | rtp_exp->mask.dst.protonum = 0xFF; | 261 | rtp_exp->mask.dst.protonum = 0xFF; |
262 | rtp_exp->flags = 0; | 262 | rtp_exp->flags = 0; |
263 | 263 | ||
@@ -271,10 +271,10 @@ static int expect_rtp_rtcp(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
271 | rtcp_exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; | 271 | rtcp_exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; |
272 | rtcp_exp->tuple.dst.u.udp.port = htons(rtp_port + 1); | 272 | rtcp_exp->tuple.dst.u.udp.port = htons(rtp_port + 1); |
273 | rtcp_exp->tuple.dst.protonum = IPPROTO_UDP; | 273 | rtcp_exp->tuple.dst.protonum = IPPROTO_UDP; |
274 | rtcp_exp->mask.src.ip = 0xFFFFFFFF; | 274 | rtcp_exp->mask.src.ip = htonl(0xFFFFFFFF); |
275 | rtcp_exp->mask.src.u.udp.port = 0; | 275 | rtcp_exp->mask.src.u.udp.port = 0; |
276 | rtcp_exp->mask.dst.ip = 0xFFFFFFFF; | 276 | rtcp_exp->mask.dst.ip = htonl(0xFFFFFFFF); |
277 | rtcp_exp->mask.dst.u.udp.port = 0xFFFF; | 277 | rtcp_exp->mask.dst.u.udp.port = htons(0xFFFF); |
278 | rtcp_exp->mask.dst.protonum = 0xFF; | 278 | rtcp_exp->mask.dst.protonum = 0xFF; |
279 | rtcp_exp->flags = 0; | 279 | rtcp_exp->flags = 0; |
280 | 280 | ||
@@ -325,7 +325,7 @@ static int expect_t120(struct sk_buff **pskb, | |||
325 | { | 325 | { |
326 | int dir = CTINFO2DIR(ctinfo); | 326 | int dir = CTINFO2DIR(ctinfo); |
327 | int ret = 0; | 327 | int ret = 0; |
328 | u_int32_t ip; | 328 | __be32 ip; |
329 | u_int16_t port; | 329 | u_int16_t port; |
330 | struct ip_conntrack_expect *exp = NULL; | 330 | struct ip_conntrack_expect *exp = NULL; |
331 | 331 | ||
@@ -342,10 +342,10 @@ static int expect_t120(struct sk_buff **pskb, | |||
342 | exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; | 342 | exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; |
343 | exp->tuple.dst.u.tcp.port = htons(port); | 343 | exp->tuple.dst.u.tcp.port = htons(port); |
344 | exp->tuple.dst.protonum = IPPROTO_TCP; | 344 | exp->tuple.dst.protonum = IPPROTO_TCP; |
345 | exp->mask.src.ip = 0xFFFFFFFF; | 345 | exp->mask.src.ip = htonl(0xFFFFFFFF); |
346 | exp->mask.src.u.tcp.port = 0; | 346 | exp->mask.src.u.tcp.port = 0; |
347 | exp->mask.dst.ip = 0xFFFFFFFF; | 347 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
348 | exp->mask.dst.u.tcp.port = 0xFFFF; | 348 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
349 | exp->mask.dst.protonum = 0xFF; | 349 | exp->mask.dst.protonum = 0xFF; |
350 | exp->flags = IP_CT_EXPECT_PERMANENT; /* Accept multiple channels */ | 350 | exp->flags = IP_CT_EXPECT_PERMANENT; /* Accept multiple channels */ |
351 | 351 | ||
@@ -626,7 +626,7 @@ void ip_conntrack_h245_expect(struct ip_conntrack *new, | |||
626 | 626 | ||
627 | /****************************************************************************/ | 627 | /****************************************************************************/ |
628 | int get_h225_addr(unsigned char *data, TransportAddress * addr, | 628 | int get_h225_addr(unsigned char *data, TransportAddress * addr, |
629 | u_int32_t * ip, u_int16_t * port) | 629 | __be32 * ip, u_int16_t * port) |
630 | { | 630 | { |
631 | unsigned char *p; | 631 | unsigned char *p; |
632 | 632 | ||
@@ -648,7 +648,7 @@ static int expect_h245(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
648 | { | 648 | { |
649 | int dir = CTINFO2DIR(ctinfo); | 649 | int dir = CTINFO2DIR(ctinfo); |
650 | int ret = 0; | 650 | int ret = 0; |
651 | u_int32_t ip; | 651 | __be32 ip; |
652 | u_int16_t port; | 652 | u_int16_t port; |
653 | struct ip_conntrack_expect *exp = NULL; | 653 | struct ip_conntrack_expect *exp = NULL; |
654 | 654 | ||
@@ -665,10 +665,10 @@ static int expect_h245(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
665 | exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; | 665 | exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; |
666 | exp->tuple.dst.u.tcp.port = htons(port); | 666 | exp->tuple.dst.u.tcp.port = htons(port); |
667 | exp->tuple.dst.protonum = IPPROTO_TCP; | 667 | exp->tuple.dst.protonum = IPPROTO_TCP; |
668 | exp->mask.src.ip = 0xFFFFFFFF; | 668 | exp->mask.src.ip = htonl(0xFFFFFFFF); |
669 | exp->mask.src.u.tcp.port = 0; | 669 | exp->mask.src.u.tcp.port = 0; |
670 | exp->mask.dst.ip = 0xFFFFFFFF; | 670 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
671 | exp->mask.dst.u.tcp.port = 0xFFFF; | 671 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
672 | exp->mask.dst.protonum = 0xFF; | 672 | exp->mask.dst.protonum = 0xFF; |
673 | exp->flags = 0; | 673 | exp->flags = 0; |
674 | 674 | ||
@@ -709,7 +709,7 @@ static int expect_callforwarding(struct sk_buff **pskb, | |||
709 | { | 709 | { |
710 | int dir = CTINFO2DIR(ctinfo); | 710 | int dir = CTINFO2DIR(ctinfo); |
711 | int ret = 0; | 711 | int ret = 0; |
712 | u_int32_t ip; | 712 | __be32 ip; |
713 | u_int16_t port; | 713 | u_int16_t port; |
714 | struct ip_conntrack_expect *exp = NULL; | 714 | struct ip_conntrack_expect *exp = NULL; |
715 | 715 | ||
@@ -751,10 +751,10 @@ static int expect_callforwarding(struct sk_buff **pskb, | |||
751 | exp->tuple.dst.ip = ip; | 751 | exp->tuple.dst.ip = ip; |
752 | exp->tuple.dst.u.tcp.port = htons(port); | 752 | exp->tuple.dst.u.tcp.port = htons(port); |
753 | exp->tuple.dst.protonum = IPPROTO_TCP; | 753 | exp->tuple.dst.protonum = IPPROTO_TCP; |
754 | exp->mask.src.ip = 0xFFFFFFFF; | 754 | exp->mask.src.ip = htonl(0xFFFFFFFF); |
755 | exp->mask.src.u.tcp.port = 0; | 755 | exp->mask.src.u.tcp.port = 0; |
756 | exp->mask.dst.ip = 0xFFFFFFFF; | 756 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
757 | exp->mask.dst.u.tcp.port = 0xFFFF; | 757 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
758 | exp->mask.dst.protonum = 0xFF; | 758 | exp->mask.dst.protonum = 0xFF; |
759 | exp->flags = 0; | 759 | exp->flags = 0; |
760 | 760 | ||
@@ -791,7 +791,7 @@ static int process_setup(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
791 | int dir = CTINFO2DIR(ctinfo); | 791 | int dir = CTINFO2DIR(ctinfo); |
792 | int ret; | 792 | int ret; |
793 | int i; | 793 | int i; |
794 | u_int32_t ip; | 794 | __be32 ip; |
795 | u_int16_t port; | 795 | u_int16_t port; |
796 | 796 | ||
797 | DEBUGP("ip_ct_q931: Setup\n"); | 797 | DEBUGP("ip_ct_q931: Setup\n"); |
@@ -1188,7 +1188,7 @@ static unsigned char *get_udp_data(struct sk_buff **pskb, int *datalen) | |||
1188 | 1188 | ||
1189 | /****************************************************************************/ | 1189 | /****************************************************************************/ |
1190 | static struct ip_conntrack_expect *find_expect(struct ip_conntrack *ct, | 1190 | static struct ip_conntrack_expect *find_expect(struct ip_conntrack *ct, |
1191 | u_int32_t ip, u_int16_t port) | 1191 | __be32 ip, u_int16_t port) |
1192 | { | 1192 | { |
1193 | struct ip_conntrack_expect *exp; | 1193 | struct ip_conntrack_expect *exp; |
1194 | struct ip_conntrack_tuple tuple; | 1194 | struct ip_conntrack_tuple tuple; |
@@ -1228,7 +1228,7 @@ static int expect_q931(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1228 | int dir = CTINFO2DIR(ctinfo); | 1228 | int dir = CTINFO2DIR(ctinfo); |
1229 | int ret = 0; | 1229 | int ret = 0; |
1230 | int i; | 1230 | int i; |
1231 | u_int32_t ip; | 1231 | __be32 ip; |
1232 | u_int16_t port; | 1232 | u_int16_t port; |
1233 | struct ip_conntrack_expect *exp; | 1233 | struct ip_conntrack_expect *exp; |
1234 | 1234 | ||
@@ -1251,10 +1251,10 @@ static int expect_q931(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1251 | exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; | 1251 | exp->tuple.dst.ip = ct->tuplehash[!dir].tuple.dst.ip; |
1252 | exp->tuple.dst.u.tcp.port = htons(port); | 1252 | exp->tuple.dst.u.tcp.port = htons(port); |
1253 | exp->tuple.dst.protonum = IPPROTO_TCP; | 1253 | exp->tuple.dst.protonum = IPPROTO_TCP; |
1254 | exp->mask.src.ip = gkrouted_only ? 0xFFFFFFFF : 0; | 1254 | exp->mask.src.ip = gkrouted_only ? htonl(0xFFFFFFFF) : 0; |
1255 | exp->mask.src.u.tcp.port = 0; | 1255 | exp->mask.src.u.tcp.port = 0; |
1256 | exp->mask.dst.ip = 0xFFFFFFFF; | 1256 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
1257 | exp->mask.dst.u.tcp.port = 0xFFFF; | 1257 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
1258 | exp->mask.dst.protonum = 0xFF; | 1258 | exp->mask.dst.protonum = 0xFF; |
1259 | exp->flags = IP_CT_EXPECT_PERMANENT; /* Accept multiple calls */ | 1259 | exp->flags = IP_CT_EXPECT_PERMANENT; /* Accept multiple calls */ |
1260 | 1260 | ||
@@ -1307,7 +1307,7 @@ static int process_gcf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1307 | { | 1307 | { |
1308 | int dir = CTINFO2DIR(ctinfo); | 1308 | int dir = CTINFO2DIR(ctinfo); |
1309 | int ret = 0; | 1309 | int ret = 0; |
1310 | u_int32_t ip; | 1310 | __be32 ip; |
1311 | u_int16_t port; | 1311 | u_int16_t port; |
1312 | struct ip_conntrack_expect *exp; | 1312 | struct ip_conntrack_expect *exp; |
1313 | 1313 | ||
@@ -1333,10 +1333,10 @@ static int process_gcf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1333 | exp->tuple.dst.ip = ip; | 1333 | exp->tuple.dst.ip = ip; |
1334 | exp->tuple.dst.u.tcp.port = htons(port); | 1334 | exp->tuple.dst.u.tcp.port = htons(port); |
1335 | exp->tuple.dst.protonum = IPPROTO_UDP; | 1335 | exp->tuple.dst.protonum = IPPROTO_UDP; |
1336 | exp->mask.src.ip = 0xFFFFFFFF; | 1336 | exp->mask.src.ip = htonl(0xFFFFFFFF); |
1337 | exp->mask.src.u.tcp.port = 0; | 1337 | exp->mask.src.u.tcp.port = 0; |
1338 | exp->mask.dst.ip = 0xFFFFFFFF; | 1338 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
1339 | exp->mask.dst.u.tcp.port = 0xFFFF; | 1339 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
1340 | exp->mask.dst.protonum = 0xFF; | 1340 | exp->mask.dst.protonum = 0xFF; |
1341 | exp->flags = 0; | 1341 | exp->flags = 0; |
1342 | exp->expectfn = ip_conntrack_ras_expect; | 1342 | exp->expectfn = ip_conntrack_ras_expect; |
@@ -1477,7 +1477,7 @@ static int process_arq(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1477 | { | 1477 | { |
1478 | struct ip_ct_h323_master *info = &ct->help.ct_h323_info; | 1478 | struct ip_ct_h323_master *info = &ct->help.ct_h323_info; |
1479 | int dir = CTINFO2DIR(ctinfo); | 1479 | int dir = CTINFO2DIR(ctinfo); |
1480 | u_int32_t ip; | 1480 | __be32 ip; |
1481 | u_int16_t port; | 1481 | u_int16_t port; |
1482 | 1482 | ||
1483 | DEBUGP("ip_ct_ras: ARQ\n"); | 1483 | DEBUGP("ip_ct_ras: ARQ\n"); |
@@ -1513,7 +1513,7 @@ static int process_acf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1513 | { | 1513 | { |
1514 | int dir = CTINFO2DIR(ctinfo); | 1514 | int dir = CTINFO2DIR(ctinfo); |
1515 | int ret = 0; | 1515 | int ret = 0; |
1516 | u_int32_t ip; | 1516 | __be32 ip; |
1517 | u_int16_t port; | 1517 | u_int16_t port; |
1518 | struct ip_conntrack_expect *exp; | 1518 | struct ip_conntrack_expect *exp; |
1519 | 1519 | ||
@@ -1538,10 +1538,10 @@ static int process_acf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1538 | exp->tuple.dst.ip = ip; | 1538 | exp->tuple.dst.ip = ip; |
1539 | exp->tuple.dst.u.tcp.port = htons(port); | 1539 | exp->tuple.dst.u.tcp.port = htons(port); |
1540 | exp->tuple.dst.protonum = IPPROTO_TCP; | 1540 | exp->tuple.dst.protonum = IPPROTO_TCP; |
1541 | exp->mask.src.ip = 0xFFFFFFFF; | 1541 | exp->mask.src.ip = htonl(0xFFFFFFFF); |
1542 | exp->mask.src.u.tcp.port = 0; | 1542 | exp->mask.src.u.tcp.port = 0; |
1543 | exp->mask.dst.ip = 0xFFFFFFFF; | 1543 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
1544 | exp->mask.dst.u.tcp.port = 0xFFFF; | 1544 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
1545 | exp->mask.dst.protonum = 0xFF; | 1545 | exp->mask.dst.protonum = 0xFF; |
1546 | exp->flags = IP_CT_EXPECT_PERMANENT; | 1546 | exp->flags = IP_CT_EXPECT_PERMANENT; |
1547 | exp->expectfn = ip_conntrack_q931_expect; | 1547 | exp->expectfn = ip_conntrack_q931_expect; |
@@ -1581,7 +1581,7 @@ static int process_lcf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1581 | { | 1581 | { |
1582 | int dir = CTINFO2DIR(ctinfo); | 1582 | int dir = CTINFO2DIR(ctinfo); |
1583 | int ret = 0; | 1583 | int ret = 0; |
1584 | u_int32_t ip; | 1584 | __be32 ip; |
1585 | u_int16_t port; | 1585 | u_int16_t port; |
1586 | struct ip_conntrack_expect *exp = NULL; | 1586 | struct ip_conntrack_expect *exp = NULL; |
1587 | 1587 | ||
@@ -1598,10 +1598,10 @@ static int process_lcf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1598 | exp->tuple.dst.ip = ip; | 1598 | exp->tuple.dst.ip = ip; |
1599 | exp->tuple.dst.u.tcp.port = htons(port); | 1599 | exp->tuple.dst.u.tcp.port = htons(port); |
1600 | exp->tuple.dst.protonum = IPPROTO_TCP; | 1600 | exp->tuple.dst.protonum = IPPROTO_TCP; |
1601 | exp->mask.src.ip = 0xFFFFFFFF; | 1601 | exp->mask.src.ip = htonl(0xFFFFFFFF); |
1602 | exp->mask.src.u.tcp.port = 0; | 1602 | exp->mask.src.u.tcp.port = 0; |
1603 | exp->mask.dst.ip = 0xFFFFFFFF; | 1603 | exp->mask.dst.ip = htonl(0xFFFFFFFF); |
1604 | exp->mask.dst.u.tcp.port = 0xFFFF; | 1604 | exp->mask.dst.u.tcp.port = htons(0xFFFF); |
1605 | exp->mask.dst.protonum = 0xFF; | 1605 | exp->mask.dst.protonum = 0xFF; |
1606 | exp->flags = IP_CT_EXPECT_PERMANENT; | 1606 | exp->flags = IP_CT_EXPECT_PERMANENT; |
1607 | exp->expectfn = ip_conntrack_q931_expect; | 1607 | exp->expectfn = ip_conntrack_q931_expect; |
diff --git a/net/ipv4/netfilter/ip_nat_helper_h323.c b/net/ipv4/netfilter/ip_nat_helper_h323.c index 419b878fb467..4a7d34466ee2 100644 --- a/net/ipv4/netfilter/ip_nat_helper_h323.c +++ b/net/ipv4/netfilter/ip_nat_helper_h323.c | |||
@@ -32,13 +32,13 @@ | |||
32 | /****************************************************************************/ | 32 | /****************************************************************************/ |
33 | static int set_addr(struct sk_buff **pskb, | 33 | static int set_addr(struct sk_buff **pskb, |
34 | unsigned char **data, int dataoff, | 34 | unsigned char **data, int dataoff, |
35 | unsigned int addroff, u_int32_t ip, u_int16_t port) | 35 | unsigned int addroff, __be32 ip, u_int16_t port) |
36 | { | 36 | { |
37 | enum ip_conntrack_info ctinfo; | 37 | enum ip_conntrack_info ctinfo; |
38 | struct ip_conntrack *ct = ip_conntrack_get(*pskb, &ctinfo); | 38 | struct ip_conntrack *ct = ip_conntrack_get(*pskb, &ctinfo); |
39 | struct { | 39 | struct { |
40 | u_int32_t ip; | 40 | __be32 ip; |
41 | u_int16_t port; | 41 | __be16 port; |
42 | } __attribute__ ((__packed__)) buf; | 42 | } __attribute__ ((__packed__)) buf; |
43 | struct tcphdr _tcph, *th; | 43 | struct tcphdr _tcph, *th; |
44 | 44 | ||
@@ -86,7 +86,7 @@ static int set_addr(struct sk_buff **pskb, | |||
86 | static int set_h225_addr(struct sk_buff **pskb, | 86 | static int set_h225_addr(struct sk_buff **pskb, |
87 | unsigned char **data, int dataoff, | 87 | unsigned char **data, int dataoff, |
88 | TransportAddress * addr, | 88 | TransportAddress * addr, |
89 | u_int32_t ip, u_int16_t port) | 89 | __be32 ip, u_int16_t port) |
90 | { | 90 | { |
91 | return set_addr(pskb, data, dataoff, addr->ipAddress.ip, ip, port); | 91 | return set_addr(pskb, data, dataoff, addr->ipAddress.ip, ip, port); |
92 | } | 92 | } |
@@ -95,7 +95,7 @@ static int set_h225_addr(struct sk_buff **pskb, | |||
95 | static int set_h245_addr(struct sk_buff **pskb, | 95 | static int set_h245_addr(struct sk_buff **pskb, |
96 | unsigned char **data, int dataoff, | 96 | unsigned char **data, int dataoff, |
97 | H245_TransportAddress * addr, | 97 | H245_TransportAddress * addr, |
98 | u_int32_t ip, u_int16_t port) | 98 | __be32 ip, u_int16_t port) |
99 | { | 99 | { |
100 | return set_addr(pskb, data, dataoff, | 100 | return set_addr(pskb, data, dataoff, |
101 | addr->unicastAddress.iPAddress.network, ip, port); | 101 | addr->unicastAddress.iPAddress.network, ip, port); |
@@ -110,7 +110,7 @@ static int set_sig_addr(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
110 | struct ip_ct_h323_master *info = &ct->help.ct_h323_info; | 110 | struct ip_ct_h323_master *info = &ct->help.ct_h323_info; |
111 | int dir = CTINFO2DIR(ctinfo); | 111 | int dir = CTINFO2DIR(ctinfo); |
112 | int i; | 112 | int i; |
113 | u_int32_t ip; | 113 | __be32 ip; |
114 | u_int16_t port; | 114 | u_int16_t port; |
115 | 115 | ||
116 | for (i = 0; i < count; i++) { | 116 | for (i = 0; i < count; i++) { |
@@ -164,7 +164,7 @@ static int set_ras_addr(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
164 | { | 164 | { |
165 | int dir = CTINFO2DIR(ctinfo); | 165 | int dir = CTINFO2DIR(ctinfo); |
166 | int i; | 166 | int i; |
167 | u_int32_t ip; | 167 | __be32 ip; |
168 | u_int16_t port; | 168 | u_int16_t port; |
169 | 169 | ||
170 | for (i = 0; i < count; i++) { | 170 | for (i = 0; i < count; i++) { |
@@ -433,7 +433,7 @@ static int nat_q931(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
433 | struct ip_ct_h323_master *info = &ct->help.ct_h323_info; | 433 | struct ip_ct_h323_master *info = &ct->help.ct_h323_info; |
434 | int dir = CTINFO2DIR(ctinfo); | 434 | int dir = CTINFO2DIR(ctinfo); |
435 | u_int16_t nated_port = port; | 435 | u_int16_t nated_port = port; |
436 | u_int32_t ip; | 436 | __be32 ip; |
437 | 437 | ||
438 | /* Set expectations for NAT */ | 438 | /* Set expectations for NAT */ |
439 | exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; | 439 | exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; |