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)
This commit is contained in:
parent
57de4fb945
commit
4eb7324870
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user