-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I still can't compile it on FreeBSD-5.2.1.
>
> Probable solution:
>       I have found that ph_inet is used in only in two functions:
> int iplattach() and int ipldetach(), in iplattach it is declared as local
> variable struct pfil_head *ph_inet, but there is no any for ipldetach. I
> just have made ph_inet global var, now it code can be compiled.

I was wrong about global vars. I have compared code for FreeBSD and NetBSD, in 
code for NetBSD:
int ipldetach()
{
        int s;
#if defined(NETBSD_PF) && (__NetBSD_Version__ >= 104200000)
        int error = 0;
# if __NetBSD_Version__ >= 105150000
        struct pfil_head *ph_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
#  ifdef USE_INET6
        struct pfil_head *ph_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6);
#  endif
# endif
#endif
...
similar code should be in FreeBSD source, but it is missed. Now I shall try to 
use it, with global vars my system rebooted after 30min, it is seemed that 
there is a memory leak.
 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iQEVAwUBQEu48uXb9tKkwh23AQLO3ggAhYOVuqBBPXMYF2I/k3iLyFnhEQzZ96Gs
dVoDGwY1ksGt9NqM3FlvsRyrwXdDZL66twOBXzcp2dWMXCdS6R30kHH+VsJGsfUu
3jYHqorH0PlER4BKlSnHgFeNzeGpCq+TajutJl7D5CVZOw7IVssWs2WPUQYg51Wi
selxvMCv6jI13Lj2ebjnvaNXx+wpseNLZpy8BBAi05BeuiX4xnT/CFtS3SVZTxK2
KxBDGJOmT1g99KRyc/U6Y7YTSRZG6xSwxF6qtCof/1KVoHaAKzsB6pHhYqj+JnvH
EqFL0JTSsUfq9GfXZgbZvt5gg7u1db/qmkaoZ6/pjBbWOwsOXMooOw==
=0U1L
-----END PGP SIGNATURE-----

Reply via email to