1234567891011121314151617181920212223242526272829303132333435363738 |
- Index: portmap.c
- ===================================================================
- --- portmap.c (revision 967)
- +++ portmap.c (working copy)
- @@ -214,14 +214,14 @@
- tcp_hdr = (tcp_hdr_t *)get_layer4(*ip_hdr);
-
- /* check if we need to remap the destination port */
- - newport = htons(map_port(portmap, tcp_hdr->th_dport));
- + newport = map_port(portmap, tcp_hdr->th_dport);
- if (newport != tcp_hdr->th_dport) {
- tcp_hdr->th_dport = newport;
- changes ++;
- }
-
- /* check if we need to remap the source port */
- - newport = htons(map_port(portmap, tcp_hdr->th_sport));
- + newport = map_port(portmap, tcp_hdr->th_sport);
- if (newport != tcp_hdr->th_sport) {
- tcp_hdr->th_sport = newport;
- changes ++;
- @@ -231,14 +231,14 @@
- udp_hdr = (udp_hdr_t *)get_layer4(*ip_hdr);
-
- /* check if we need to remap the destination port */
- - newport = htons(map_port(portmap, udp_hdr->uh_dport));
- + newport = map_port(portmap, udp_hdr->uh_dport);
- if (newport != udp_hdr->uh_dport) {
- udp_hdr->uh_dport = newport;
- changes ++;
- }
-
- /* check if we need to remap the source port */
- - newport = htons(map_port(portmap, udp_hdr->uh_sport));
- + newport = map_port(portmap, udp_hdr->uh_sport);
- if (newport != udp_hdr->uh_sport) {
- udp_hdr->uh_sport = newport;
- changes ++;
|