Skip to content

Commit 8b8f081

Browse files
TaeheeYooummakynes
authored andcommitted
netfilter: nf_nat_snmp_basic: replace ctinfo with dir.
The snmp_translate() receives ctinfo data to get dir value only. because of caller already has dir value, we just replace ctinfo with dir. Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent e29e5dd commit 8b8f081

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

net/ipv4/netfilter/nf_nat_snmp_basic.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,15 +1082,12 @@ static int snmp_parse_mangle(unsigned char *msg,
10821082
/*
10831083
* SNMP translation routine.
10841084
*/
1085-
static int snmp_translate(struct nf_conn *ct,
1086-
enum ip_conntrack_info ctinfo,
1087-
struct sk_buff *skb)
1085+
static int snmp_translate(struct nf_conn *ct, int dir, struct sk_buff *skb)
10881086
{
10891087
struct iphdr *iph = ip_hdr(skb);
10901088
struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl);
10911089
u_int16_t udplen = ntohs(udph->len);
10921090
u_int16_t paylen = udplen - sizeof(struct udphdr);
1093-
int dir = CTINFO2DIR(ctinfo);
10941091
struct oct1_map map;
10951092

10961093
/*
@@ -1155,7 +1152,7 @@ static int help(struct sk_buff *skb, unsigned int protoff,
11551152
return NF_DROP;
11561153

11571154
spin_lock_bh(&snmp_lock);
1158-
ret = snmp_translate(ct, ctinfo, skb);
1155+
ret = snmp_translate(ct, dir, skb);
11591156
spin_unlock_bh(&snmp_lock);
11601157
return ret;
11611158
}

0 commit comments

Comments
 (0)