if (direction == PF_OUT) {
bport = nport = th->th_sport;
/* check outgoing packet for BINAT/NAT */
if ((nr = pf_get_translation(pd, m, off, PF_OUT, kif, &nsn,
saddr, th->th_sport, daddr, th->th_dport,
&pd->naddr, &nport)) != NULL) {
PF_ACPY(&pd->baddr, saddr, af);
pf_change_ap(saddr, &th->th_sport, pd->ip_sum,
&th->th_sum, &pd->naddr, nport, 0, af);
rewrite++;
if (nr->natpass)
r = NULL;
pd->nat_rule = nr;
}
} else {
bport = nport = th->th_dport;
/* check incoming packet for BINAT/RDR */
if ((nr = pf_get_translation(pd, m, off, PF_IN, kif, &nsn,
saddr, th->th_sport, daddr, th->th_dport,
&pd->naddr, &nport)) != NULL) {
PF_ACPY(&pd->baddr, daddr, af);
pf_change_ap(daddr, &th->th_dport, pd->ip_sum,
&th->th_sum, &pd->naddr, nport, 0, af);
rewrite++;
if (nr->natpass)
r = NULL;
pd->nat_rule = nr;
}
}
какой смысл в таком коде? может я чего не понимаю?
Ответ на:
комментарий
от stassats

Ответ на:
комментарий
от Pi
Ответ на:
комментарий
от stassats
Ответ на:
комментарий
от stassats
Ответ на:
комментарий
от stassats

Ответ на:
комментарий
от Pi
Ответ на:
комментарий
от stassats

Ответ на:
комментарий
от Pi



Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум RAW SOCKET (2002)
- Форум OpenBSD pf altq (2010)
- Форум OpenBSD pf + geoip (2007)
- Форум MS Code + OpenBSD (2017)
- Форум OpenBSD, pf, ftp-proxy (2009)
- Форум OpenBSD PF и IPF (2004)
- Новости Песни к OpenBSD 4.0 (2006)
- Новости OpenBSD 4.0 — предварительный заказ (2006)
- Новости OpenBSD 4.0: приключения Pufferix (2006)
- Форум openbsd pf отказывается шейпить трафик (2017)