Home | History | Annotate | Download | only in netinet
History log of /src/sys/external/bsd/ipf/netinet/ip_nat.h
RevisionDateAuthorComments
 1.8  07-May-2022  mrg remove conditional code that defines members of natstat_t.

kernels without INET6 support end up with a different size of
this structure than the userland does and then it errors:

# ipnat -l
70:ioctl(SIOCGNATS) object size mismatch for copying out ipfobj

with these members (which are zeroed at ipf init) enabled, the
size check works.


XXX: pullup-9 (change tested there.)
 1.7  07-Aug-2015  prlw1 Avoid panic in SIOCGNATL dereferencing a NULL softc.
Solution suggestion from Martin Husemann.
 1.6  09-Jan-2013  christos branches: 1.6.12; 1.6.14;
Back out my last change, which was a partial fix for hash code computation problems.
Apply Darren's more complete reworking of hash code computation.
Ensure that the struct containing the red-black tree head is properly initialized.
From Geoff Adams
 1.5  05-Jan-2013  christos Fix bucket and chain counts on nat lists from Geoff Adams:

The problem was that ipf_nat_delete wasn't swapping inbound and
outbound hash codes for inbound NAT entries, so it was essentially
always looking in the wrong buckets in those cases. But because of
the way the linked list works, I don't think any NAT entries were
actually leaked. But since all the bucket counters and chain count
were getting messed up, things did start to go bad after a while.
(New NAT entries wouldn't be created, for instance.)

The fix is in the ipf_nat_delete function, itself; the other changes
are a slight refactoring of one method and adding some comments
that helped me figure out how the linked list with pointer-back-pointers
worked.

Also note that I haven't looked through the logic in ipf_nat_rehash;
it's likely that that might miss some things for the same reason.

I also haven't yet looked into the ipf_nat_newrdr problem with mappings
already existing. That'll be next.
 1.4  15-Sep-2012  plunky the result of the construct

#define FOO defined(BAR)

#if FOO
[conditional code]
#endif

is "undefined", according to C99 6.10.1 note 4. So, change code like
that to use the following paradigm

#if defined(BAR)
#define FOO 1
#else
#define FOO 0
#endif

#if FOO
[conditional code]
#endif
 1.3  22-Jul-2012  darrenr branches: 1.3.2;
Merge IPFilter 5.1.2 into HEAD
 1.2  23-Mar-2012  christos branches: 1.2.2; 1.2.4;
apply our changes.
- prototypes
- ip_h323_pxy.c is missing from the distribution
- original tar distribution is missing <$>Id values in most files
 1.1  23-Mar-2012  christos branches: 1.1.1;
Initial revision
 1.1.1.2  22-Jul-2012  darrenr Import IPFilter 5.1.2
 1.1.1.1  23-Mar-2012  christos import kernel portion of ipfilter 5.1.1
 1.2.4.4  23-Jan-2013  yamt sync with head
 1.2.4.3  30-Oct-2012  yamt sync with head
 1.2.4.2  17-Apr-2012  yamt sync with head
 1.2.4.1  23-Mar-2012  yamt file ip_nat.h was added on branch yamt-pagecache on 2012-04-17 00:08:16 +0000
 1.2.2.2  17-Apr-2012  joerg Re-add new ipf on the jmcneill-usbmp branch.
 1.2.2.1  23-Mar-2012  joerg file ip_nat.h was added on branch jmcneill-usbmp on 2012-04-17 19:25:20 +0000
 1.3.2.3  03-Dec-2017  jdolecek update from HEAD
 1.3.2.2  25-Feb-2013  tls resync with head
 1.3.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.6.14.1  22-Sep-2015  skrll Sync with HEAD
 1.6.12.1  08-Aug-2015  martin Pull up following revision(s) (requested by prlw1 in ticket #939):
sys/external/bsd/ipf/netinet/ip_nat.h: revision 1.7
sys/external/bsd/ipf/netinet/ip_nat.c: revision 1.14
sys/external/bsd/ipf/netinet/ip_nat6.c: revision 1.8
Avoid panic in SIOCGNATL dereferencing a NULL softc.
Solution suggestion from Martin Husemann.

RSS XML Feed