diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-07-14 02:46:34 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-07-14 02:46:34 +0000 |
commit | d096fc9ccd1693b334d86458b37da5096e40052f (patch) | |
tree | c9542647e6c553ada474701a1dde0df871e88f56 /sys/contrib/ipfilter/netinet | |
parent | 49a28fbdd2dba9a672e593e5442b42d4b6501181 (diff) | |
download | src-d096fc9ccd1693b334d86458b37da5096e40052f.tar.gz src-d096fc9ccd1693b334d86458b37da5096e40052f.zip |
Calculate the offset of the interface name using FR_NAME rather than
calclulating it "by hand". This improves consistency with the rest of
the code and is in line with planned fixes and other work.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=349980
Diffstat (limited to 'sys/contrib/ipfilter/netinet')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_state.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index f364c295e4c0..c696406d4182 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -980,7 +980,7 @@ ipf_state_putent(softc, softs, data) fr->fr_ifas[i] = NULL; continue; } - name = fr->fr_names + fr->fr_ifnames[i]; + name = FR_NAME(fr, fr_ifnames[i]); fr->fr_ifas[i] = ipf_resolvenic(softc, name, fr->fr_family); } @@ -1794,7 +1794,7 @@ ipf_state_add(softc, fin, stsave, flags) fr->fr_names[fr->fr_ifnames[out << 1] + 1] == '\0')) { is->is_ifp[out << 1] = fr->fr_ifas[0]; strncpy(is->is_ifname[out << 1], - fr->fr_names + fr->fr_ifnames[0], + FR_NAME(fr, fr_ifnames[0]), sizeof(fr->fr_ifnames[0])); } else { is->is_ifp[out << 1] = fin->fin_ifp; @@ -1805,21 +1805,21 @@ ipf_state_add(softc, fin, stsave, flags) is->is_ifp[(out << 1) + 1] = fr->fr_ifas[1]; if (fr->fr_ifnames[1] != -1) { strncpy(is->is_ifname[(out << 1) + 1], - fr->fr_names + fr->fr_ifnames[1], + FR_NAME(fr, fr_ifnames[1]), sizeof(fr->fr_ifnames[1])); } is->is_ifp[(1 - out) << 1] = fr->fr_ifas[2]; if (fr->fr_ifnames[2] != -1) { strncpy(is->is_ifname[((1 - out) << 1)], - fr->fr_names + fr->fr_ifnames[2], + FR_NAME(fr, fr_ifnames[2]), sizeof(fr->fr_ifnames[2])); } is->is_ifp[((1 - out) << 1) + 1] = fr->fr_ifas[3]; if (fr->fr_ifnames[3] != -1) { strncpy(is->is_ifname[((1 - out) << 1) + 1], - fr->fr_names + fr->fr_ifnames[3], + FR_NAME(fr, fr_ifnames[3]), sizeof(fr->fr_ifnames[3])); } } else { |