Skip to contentSkip to conversation

null binding question

DISCUSSION Balazs Scheidler 2 participants 2 messages Aug 8, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

I'm reading the source code again to hunt down another Oops and I can't see why null_binding is required. Can anyone explain me? A short hint would be enough.

TPROXY does not allocate NULL bindings on its own, however NAT does this for non-local connections. Quoting ip_nat_standalone.c:

#ifdef CONFIG_IP_NF_NAT_LOCAL
                                if (hooknum == NF_IP_LOCAL_IN) {
                                        ret = NF_ACCEPT;
                                } else

#endif
ret = ip_nat_rule_find(pskb, hooknum, in, out,
ct, info);

Therefore as it seems it is not needed for local NATs. Is there a specific reason?

Signature · 2 lines
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
#1 lore raw

----- Original Message -----
From: "Balazs Scheidler" <[email protected]>
To: <[email protected]>
Sent: Friday, August 08, 2003 4:15 PM
Subject: null binding question

Quoted 3 lines

Hi,

I'm reading the source code again to hunt down another Oops and I can't

see

Quoted 2 lines

why null_binding is required. Can anyone explain me? A short hint would be enough.

In case some connection have used this guy's original tupple for its nated tupple(e.g. steal this guy's client port), So even no nat rule applied to this guy, then without the null binding check, this guy will eventually fail to confirm it's reply tupple(stolen by the previous some connection), while with null binding, this guy may have chance to get it's reply uniche again(nat will get him a uniche tuple).
Can this be short enough to get? :-)

Quoted 2 lines

TPROXY does not allocate NULL bindings on its own, however NAT does this

for

Quoted 4 lines

non-local connections. Quoting ip_nat_standalone.c:

#ifdef CONFIG_IP_NF_NAT_LOCAL
                                if (hooknum == NF_IP_LOCAL_IN) {

Currently kernel don't implement nat table at NF_IP_LOCAL_IN, which is only for LOCAL_OUT dnat thing's reply, so do'nt see any relation to null binding.

Quoted 4 lines
                                        ret = NF_ACCEPT;
                                } else

#endif
ret = ip_nat_rule_find(pskb, hooknum, in,

out,

Quoted 8 lines
                                                       ct, info);

Therefore as it seems it is not needed for local NATs. Is there a specific reason?

--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C

8EB1