diff options
author | luigi <luigi@FreeBSD.org> | 2002-09-12 00:45:32 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2002-09-12 00:45:32 +0000 |
commit | 4eb7324870821ed43689fe000ead5b3815f6e051 (patch) | |
tree | 03a12882d9a398c83ef22763597b9407e6896f2a /sbin | |
parent | 57de4fb94545b659220eab0ea85fc5c601859bee (diff) | |
download | FreeBSD-src-4eb7324870821ed43689fe000ead5b3815f6e051.zip FreeBSD-src-4eb7324870821ed43689fe000ead5b3815f6e051.tar.gz |
Store the port number in "fwd" rules in host format, same as ipfw1
has always done.
Technically, this is the wrong format, but it reduces the diffs in
-stable. Someday, when we get rid of ipfw1, I will put the port number
in the proper format both in kernel and userland.
MFC after: 3 days
(with re@ permission)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 3080fdf..b740503 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -908,7 +908,7 @@ show_ipfw(struct ip_fw *rule) printf("fwd %s", inet_ntoa(s->sa.sin_addr)); if (s->sa.sin_port) - printf(",%d", ntohs(s->sa.sin_port)); + printf(",%d", s->sa.sin_port); } break; @@ -2592,7 +2592,7 @@ add(int ac, char *av[]) if (s == end) errx(EX_DATAERR, "illegal forwarding port ``%s''", s); - p->sa.sin_port = htons( (u_short)i ); + p->sa.sin_port = (u_short)i; } lookup_host(*av, &(p->sa.sin_addr)); } |