sync with OpenBSD -current
This commit is contained in:
parent
8a8a1e99b4
commit
b4e8a16d44
25 changed files with 1362 additions and 209 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: in_pcb.c,v 1.289 2024/02/02 15:39:23 bluhm Exp $ */
|
||||
/* $OpenBSD: in_pcb.c,v 1.290 2024/02/07 23:40:40 bluhm Exp $ */
|
||||
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -916,24 +916,10 @@ in_pcbrtentry(struct inpcb *inp)
|
|||
|
||||
ro = &inp->inp_route;
|
||||
|
||||
/* check if route is still valid */
|
||||
if (!rtisvalid(ro->ro_rt)) {
|
||||
rtfree(ro->ro_rt);
|
||||
ro->ro_rt = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* No route yet, so try to acquire one.
|
||||
*/
|
||||
if (inp->inp_faddr.s_addr == INADDR_ANY)
|
||||
return (NULL);
|
||||
route_cache(ro, inp->inp_faddr, inp->inp_rtableid);
|
||||
if (ro->ro_rt == NULL) {
|
||||
memset(ro, 0, sizeof(struct route));
|
||||
|
||||
if (inp->inp_faddr.s_addr == INADDR_ANY)
|
||||
return (NULL);
|
||||
ro->ro_dst.sa_family = AF_INET;
|
||||
ro->ro_dst.sa_len = sizeof(struct sockaddr_in);
|
||||
satosin(&ro->ro_dst)->sin_addr = inp->inp_faddr;
|
||||
ro->ro_tableid = inp->inp_rtableid;
|
||||
ro->ro_rt = rtalloc_mpath(&ro->ro_dst,
|
||||
&inp->inp_laddr.s_addr, ro->ro_tableid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue