diff options
| author | Alexander Langer <alex@FreeBSD.org> | 1998-02-06 02:45:54 +0000 |
|---|---|---|
| committer | Alexander Langer <alex@FreeBSD.org> | 1998-02-06 02:45:54 +0000 |
| commit | 34c7729f52821d1cbb41d4f25395da7da43db2fd (patch) | |
| tree | 8def81143d6db4c5fb6c2b836b4d5e072caeae08 | |
| parent | 87884aad6ee7a01f0d7e9d79c90e6376b34fd820 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/ip_fw.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c index 6525e78baed6..d55686026cd3 100644 --- a/sys/netinet/ip_fw.c +++ b/sys/netinet/ip_fw.c @@ -12,7 +12,7 @@ * * This software is provided ``AS IS'' without any warranties of any kind. * - * $Id: ip_fw.c,v 1.73 1998/01/08 23:41:52 eivind Exp $ + * $Id: ip_fw.c,v 1.74 1998/02/04 22:33:07 eivind Exp $ */ /* @@ -310,16 +310,24 @@ ipfw_report(struct ip_fw *f, struct ip *ip, case IPPROTO_TCP: printf("TCP "); print_ip(ip->ip_src); - printf(":%d ", ntohs(tcp->th_sport)); + if ((ip->ip_off & IP_OFFMASK) == 0) + printf(":%d ", ntohs(tcp->th_sport)); + else + printf(" "); print_ip(ip->ip_dst); - printf(":%d", ntohs(tcp->th_dport)); + if ((ip->ip_off & IP_OFFMASK) == 0) + printf(":%d", ntohs(tcp->th_dport)); break; case IPPROTO_UDP: printf("UDP "); print_ip(ip->ip_src); - printf(":%d ", ntohs(udp->uh_sport)); + if ((ip->ip_off & IP_OFFMASK) == 0) + printf(":%d ", ntohs(udp->uh_sport)); + else + printf(" "); print_ip(ip->ip_dst); - printf(":%d", ntohs(udp->uh_dport)); + if ((ip->ip_off & IP_OFFMASK) == 0) + printf(":%d", ntohs(udp->uh_dport)); break; case IPPROTO_ICMP: printf("ICMP:%u.%u ", icmp->icmp_type, icmp->icmp_code); |
