summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-04-25 17:38:08 +0000
committerrwatson <rwatson@FreeBSD.org>2006-04-25 17:38:08 +0000
commit01b24f64ce5690f21ef80f285947a1d3ba513a1e (patch)
tree8e6705d2af522598c7f364dee164caf88539d8cb /sys/netinet
parent67908520ecd19cc46d126444d903796728b5e697 (diff)
downloadFreeBSD-src-01b24f64ce5690f21ef80f285947a1d3ba513a1e.zip
FreeBSD-src-01b24f64ce5690f21ef80f285947a1d3ba513a1e.tar.gz
Rename 'last' to 'inp' in udp_append(): the name 'last' is due to
the fact that the loop through inpcb's in udp_input() tracks the last inpcb while looping. We keep that name in the calling loop but not in the delivery routine itself. MFC after: 3 months
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/udp_usrreq.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index fb0b76a..b7b45f3 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -439,8 +439,8 @@ badunlocked:
* into the socket code.
*/
static void
-udp_append(last, ip, n, off, udp_in)
- struct inpcb *last;
+udp_append(inp, ip, n, off, udp_in)
+ struct inpcb *inp;
struct ip *ip;
struct mbuf *n;
int off;
@@ -453,11 +453,11 @@ udp_append(last, ip, n, off, udp_in)
struct sockaddr_in6 udp_in6;
#endif
- INP_LOCK_ASSERT(last);
+ INP_LOCK_ASSERT(inp);
#if defined(IPSEC) || defined(FAST_IPSEC)
/* check AH/ESP integrity. */
- if (ipsec4_in_reject(n, last)) {
+ if (ipsec4_in_reject(n, inp)) {
#ifdef IPSEC
ipsecstat.in_polvio++;
#endif /*IPSEC*/
@@ -466,27 +466,27 @@ udp_append(last, ip, n, off, udp_in)
}
#endif /*IPSEC || FAST_IPSEC*/
#ifdef MAC
- if (mac_check_inpcb_deliver(last, n) != 0) {
+ if (mac_check_inpcb_deliver(inp, n) != 0) {
m_freem(n);
return;
}
#endif
- if (last->inp_flags & INP_CONTROLOPTS ||
- last->inp_socket->so_options & (SO_TIMESTAMP | SO_BINTIME)) {
+ if (inp->inp_flags & INP_CONTROLOPTS ||
+ inp->inp_socket->so_options & (SO_TIMESTAMP | SO_BINTIME)) {
#ifdef INET6
- if (last->inp_vflag & INP_IPV6) {
+ if (inp->inp_vflag & INP_IPV6) {
int savedflags;
- savedflags = last->inp_flags;
- last->inp_flags &= ~INP_UNMAPPABLEOPTS;
- ip6_savecontrol(last, n, &opts);
- last->inp_flags = savedflags;
+ savedflags = inp->inp_flags;
+ inp->inp_flags &= ~INP_UNMAPPABLEOPTS;
+ ip6_savecontrol(inp, n, &opts);
+ inp->inp_flags = savedflags;
} else
#endif
- ip_savecontrol(last, &opts, ip, n);
+ ip_savecontrol(inp, &opts, ip, n);
}
#ifdef INET6
- if (last->inp_vflag & INP_IPV6) {
+ if (inp->inp_vflag & INP_IPV6) {
bzero(&udp_in6, sizeof(udp_in6));
udp_in6.sin6_len = sizeof(udp_in6);
udp_in6.sin6_family = AF_INET6;
@@ -497,7 +497,7 @@ udp_append(last, ip, n, off, udp_in)
append_sa = (struct sockaddr *)udp_in;
m_adj(n, off);
- so = last->inp_socket;
+ so = inp->inp_socket;
SOCKBUF_LOCK(&so->so_rcv);
if (sbappendaddr_locked(&so->so_rcv, append_sa, n, opts) == 0) {
m_freem(n);
OpenPOWER on IntegriCloud