inpcb: in_pcblookup_addrport -> in_pcblookup_localremote
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 16 Mar 2014 11:48:05 +0000 (19:48 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 16 Mar 2014 11:48:05 +0000 (19:48 +0800)
Compared w/ in_pcblookup_local, in_pcblookup_addrport checks remote
address and port (faddr,fport) too.  Renaming it to
in_pcblookup_localremote to be consistent w/ in_pcblookup_local name.

No functional changes.

sys/netinet/in_pcb.c

index 6297fcc..48a11db 100644 (file)
@@ -507,7 +507,7 @@ done:
 }
 
 static struct inpcb *
-in_pcblookup_addrport(struct inpcbinfo *pcbinfo, struct in_addr laddr,
+in_pcblookup_localremote(struct inpcbinfo *pcbinfo, struct in_addr laddr,
     u_short lport, struct in_addr faddr, u_short fport, struct ucred *cred)
 {
        struct inpcb *inp;
@@ -646,8 +646,8 @@ again:
                        if (*lastport > first || *lastport < last)
                                *lastport = first;
                        lport = htons(*lastport);
-               } while (in_pcblookup_addrport(pcbinfo, inp->inp_laddr, lport,
-                               sin->sin_addr, sin->sin_port, cred));
+               } while (in_pcblookup_localremote(pcbinfo, inp->inp_laddr,
+                   lport, sin->sin_addr, sin->sin_port, cred));
        } else {
                /*
                 * counting up
@@ -664,8 +664,8 @@ again:
                        if (*lastport < first || *lastport > last)
                                *lastport = first;
                        lport = htons(*lastport);
-               } while (in_pcblookup_addrport(pcbinfo, inp->inp_laddr, lport,
-                               sin->sin_addr, sin->sin_port, cred));
+               } while (in_pcblookup_localremote(pcbinfo, inp->inp_laddr,
+                   lport, sin->sin_addr, sin->sin_port, cred));
        }
 
        /* This could happen on loopback interface */