Thanks Darren
that solves the panic.

Does it indicate anything if the "List of active sessions:" still has old IP address (sppp0) if I drop the PPPoE and bring it back up, do a ipf -y, then ipnat -slv and get active connections with old values?
Does this indicate that it is not getting flushed correctly on the "ipf -y" command?



[EMAIL PROTECTED] bash-2.05$ /etc/init.d/ppplink stop Taking down PPP link... done [EMAIL PROTECTED] bash-2.05$ /etc/init.d/ppplink start connect option: '/usr/lib/inet/pppoec -v dmfe0' started (pid 14027) <snip> local IP address 66.122.244.68 remote IP address 66.122.247.254 primary DNS address 206.13.30.12 secondary DNS address 206.13.29.12

[EMAIL PROTECTED] bash-2.05$ ipf -y
filter sync'd

[EMAIL PROTECTED] bash-2.05$ ipnat -slv
mapped    in    15810    out    17029
added    223    expired    0
no memory    0    bad nat    0
inuse    3
rules    3
wilds    0
table ffffffff7fffeee8 list 3003a4a6a80
List of active MAP/Redirect filters:
map sppp0 192.168.0.0/24 -> 0.0.0.0/32 proxy port ftp ftp/tcp mssclamp 1402
map sppp0 192.168.0.0/24 -> 0.0.0.0/32 portmap tcp/udp auto mssclamp 1402
map sppp0 192.168.0.0/24 -> 0.0.0.0/32 mssclamp 1402

List of active sessions:
MAP 192.168.0.100   1726  <- -> 67.124.198.116  26438 [66.106.186.120 143]
   age 946771 use 0 sumd 0xa96c/0xa96c pr 6 bkt 1982/1880 flags 1
   ifp -,- bytes 137554/131459 pkts 1217/1368 48e4
MAP 192.168.0.100   1702  <- -> 67.124.198.116  26414 [67.94.73.226 1494]
   age 946749 use 0 sumd 0xa96c/0xa96c pr 6 bkt 521/419 flags 1
   ifp -,- bytes 1175802/285593 pkts 4091/4921 48e4
MAP 192.168.0.100   1700  <- -> 67.124.198.116  26412 [66.106.186.120 143]
   age 941998 use 0 sumd 0xa96c/0xa96c pr 6 bkt 1956/1854 flags 1
   ifp -,- bytes 4335/457 pkts 13/9 48e4

List of active host mappings:
192.168.0.100,66.106.186.120 -> 0.0.0.0 (use = 2 hv = 446)
192.168.0.100,67.94.73.226 -> 0.0.0.0 (use = 1 hv = 1406)


Homer



There are two patches in this file.

The first will stop "from any to sppp0/32" panic'ing on Solaris.

The second makes ipfstat print it out properly.

Darren

Index: ip_fil_solaris.c
===================================================================
RCS file: /devel/CVS/IP-Filter/ip_fil_solaris.c,v
retrieving revision 2.62.2.2
diff -c -r2.62.2.2 ip_fil_solaris.c
*** ip_fil_solaris.c 2004/03/22 12:18:11 2.62.2.2
--- ip_fil_solaris.c 2004/03/29 15:11:23
***************
*** 800,805 ****
--- 800,808 ----
struct sockaddr_in sin, mask;
qif_t *qif;
+ if ((qifptr == NULL) || (qifptr == (void *)-1))
+ return -1;
+ qif = qifptr;
#ifdef USE_INET6
Index: lib/printfr.c
===================================================================
RCS file: /devel/CVS/IP-Filter/lib/printfr.c,v
retrieving revision 1.43.2.1
diff -c -r1.43.2.1 printfr.c
*** printfr.c 2004/03/06 14:33:29 1.43.2.1
--- printfr.c 2004/03/29 14:53:33
***************
*** 31,36 ****
--- 31,89 ----
}
+ static void printaddr(v, type, ifname, addr, mask)
+ int v, type;
+ char *ifname;
+ u_32_t *addr, *mask;
+ {
+ char *suffix;
+ + switch (type)
+ {
+ case FRI_BROADCAST :
+ suffix = "/bcast";
+ break;
+ + case FRI_DYNAMIC :
+ printf("%s", ifname);
+ printmask(mask);
+ suffix = NULL;
+ break;
+ + case FRI_NETWORK :
+ suffix = "/net";
+ break;
+ + case FRI_NETMASKED :
+ suffix = "/netmasked";
+ break;
+ + case FRI_PEERADDR :
+ suffix = "/peer";
+ break;
+ + case FRI_LOOKUP :
+ suffix = NULL;
+ printlookup((i6addr_t *)addr, (i6addr_t *)mask);
+ break;
+ + case FRI_NORMAL :
+ printhostmask(v, addr, mask);
+ suffix = NULL;
+ break;
+ default :
+ printf("<%d>", type);
+ printmask(mask);
+ suffix = NULL;
+ break;
+ }
+ + if (suffix != NULL) {
+ printf("%s/%s", ifname, suffix);
+ }
+ }
+ + /*
* print the filter structure in a useful way
*/
***************
*** 161,204 ****
printf("all");
} else if (type == FR_T_IPF) {
printf("from %s", fp->fr_flags & FR_NOTSRCIP ? "!" : "");
! if (fp->fr_satype != FRI_NORMAL) {
! if (fp->fr_satype == FRI_BROADCAST)
! printf("%s/bcast", fp->fr_ifname);
! else if (fp->fr_satype == FRI_NETWORK)
! printf("%s/net", fp->fr_ifname);
! else if (fp->fr_satype == FRI_NETMASKED)
! printf("%s/netmasked", fp->fr_ifname);
! else if (fp->fr_satype == FRI_PEERADDR)
! printf("%s/peer", fp->fr_ifname);
! else if (fp->fr_satype == FRI_LOOKUP)
! printlookup(&fp->fr_ip.fi_src,
! &fp->fr_mip.fi_src);
! else
! printmask((u_32_t *)&fp->fr_smsk.s_addr);
! } else
! printhostmask(fp->fr_v, (u_32_t *)&fp->fr_src.s_addr,
! (u_32_t *)&fp->fr_smsk.s_addr);
if (fp->fr_scmp)
printportcmp(pr, &fp->fr_tuc.ftu_src);
printf(" to %s", fp->fr_flags & FR_NOTDSTIP ? "!" : "");
! if (fp->fr_datype != FRI_NORMAL) {
! if (fp->fr_datype == FRI_BROADCAST)
! printf("%s/bcast", fp->fr_ifname);
! else if (fp->fr_datype == FRI_NETWORK)
! printf("%s/net", fp->fr_ifname);
! else if (fp->fr_datype == FRI_NETMASKED)
! printf("%s/netmasked", fp->fr_ifname);
! else if (fp->fr_datype == FRI_PEERADDR)
! printf("%s/peer", fp->fr_ifname);
! else if (fp->fr_datype == FRI_LOOKUP)
! printlookup(&fp->fr_ip.fi_dst,
! &fp->fr_mip.fi_dst);
! else
! printmask((u_32_t *)&fp->fr_dmsk.s_addr);
! } else
! printhostmask(fp->fr_v, (u_32_t *)&fp->fr_dst.s_addr,
! (u_32_t *)&fp->fr_dmsk.s_addr);
if (fp->fr_dcmp)
printportcmp(pr, &fp->fr_tuc.ftu_dst);
--- 214,227 ----
printf("all");
} else if (type == FR_T_IPF) {
printf("from %s", fp->fr_flags & FR_NOTSRCIP ? "!" : "");
! printaddr(fp->fr_v, fp->fr_satype, fp->fr_ifname,
! &fp->fr_src.s_addr, &fp->fr_smsk.s_addr);
if (fp->fr_scmp)
printportcmp(pr, &fp->fr_tuc.ftu_src);
printf(" to %s", fp->fr_flags & FR_NOTDSTIP ? "!" : "");
! printaddr(fp->fr_v, fp->fr_datype, fp->fr_ifname,
! &fp->fr_dst.s_addr, &fp->fr_dmsk.s_addr);
if (fp->fr_dcmp)
printportcmp(pr, &fp->fr_tuc.ftu_dst);





Reply via email to