version 1.13, 2014/07/12 14:54:32 |
version 1.13.4.1, 2015/09/22 12:06:06 |
Line 1227 ipf_nat_ioctl(ipf_main_softc_t *softc, v |
|
Line 1227 ipf_nat_ioctl(ipf_main_softc_t *softc, v |
|
switch (nl.nl_v) |
switch (nl.nl_v) |
{ |
{ |
case 4 : |
case 4 : |
ptr = ipf_nat_lookupredir(&nl); |
ptr = ipf_nat_lookupredir(softc, &nl); |
break; |
break; |
#ifdef USE_INET6 |
#ifdef USE_INET6 |
case 6 : |
case 6 : |
ptr = ipf_nat6_lookupredir(&nl); |
ptr = ipf_nat6_lookupredir(softc, &nl); |
break; |
break; |
#endif |
#endif |
default: |
default: |
Line 4574 find_out_wild_ports: |
|
Line 4574 find_out_wild_ports: |
|
/* nl_out* = destination information (translated) */ |
/* nl_out* = destination information (translated) */ |
/* ------------------------------------------------------------------------ */ |
/* ------------------------------------------------------------------------ */ |
nat_t * |
nat_t * |
ipf_nat_lookupredir(natlookup_t *np) |
ipf_nat_lookupredir(ipf_main_softc_t *softc, natlookup_t *np) |
{ |
{ |
fr_info_t fi; |
fr_info_t fi; |
nat_t *nat; |
nat_t *nat; |
|
|
bzero((char *)&fi, sizeof(fi)); |
bzero((char *)&fi, sizeof(fi)); |
|
fi.fin_main_soft = softc; |
if (np->nl_flags & IPN_IN) { |
if (np->nl_flags & IPN_IN) { |
fi.fin_data[0] = ntohs(np->nl_realport); |
fi.fin_data[0] = ntohs(np->nl_realport); |
fi.fin_data[1] = ntohs(np->nl_outport); |
fi.fin_data[1] = ntohs(np->nl_outport); |