| version 1.278, 2009/01/19 02:27:57 |
version 1.279, 2009/03/18 17:06:52 |
| Line 1562 ip_dooptions(struct mbuf *m) |
|
| Line 1562 ip_dooptions(struct mbuf *m) |
|
| /* |
/* |
| * locate outgoing interface |
* locate outgoing interface |
| */ |
*/ |
| bcopy((void *)(cp + off), (void *)&ipaddr.sin_addr, |
memcpy( (void *)&ipaddr.sin_addr, (void *)(cp + off), |
| sizeof(ipaddr.sin_addr)); |
sizeof(ipaddr.sin_addr)); |
| if (opt == IPOPT_SSRR) |
if (opt == IPOPT_SSRR) |
| ia = ifatoia(ifa_ifwithladdr(sintosa(&ipaddr))); |
ia = ifatoia(ifa_ifwithladdr(sintosa(&ipaddr))); |
| Line 1598 ip_dooptions(struct mbuf *m) |
|
| Line 1598 ip_dooptions(struct mbuf *m) |
|
| off--; /* 0 origin */ |
off--; /* 0 origin */ |
| if ((off + sizeof(struct in_addr)) > optlen) |
if ((off + sizeof(struct in_addr)) > optlen) |
| break; |
break; |
| bcopy((void *)(&ip->ip_dst), (void *)&ipaddr.sin_addr, |
memcpy( (void *)&ipaddr.sin_addr, (void *)(&ip->ip_dst), |
| sizeof(ipaddr.sin_addr)); |
sizeof(ipaddr.sin_addr)); |
| /* |
/* |
| * locate outgoing interface; if we're the destination, |
* locate outgoing interface; if we're the destination, |
| Line 1665 ip_dooptions(struct mbuf *m) |
|
| Line 1665 ip_dooptions(struct mbuf *m) |
|
| (u_char *)ip; |
(u_char *)ip; |
| goto bad; |
goto bad; |
| } |
} |
| bcopy(cp0, &ipaddr.sin_addr, |
memcpy( &ipaddr.sin_addr, cp0, |
| sizeof(struct in_addr)); |
sizeof(struct in_addr)); |
| if (ifatoia(ifa_ifwithaddr(sintosa(&ipaddr))) |
if (ifatoia(ifa_ifwithaddr(sintosa(&ipaddr))) |
| == NULL) |
== NULL) |
| Line 1739 save_rte(u_char *option, struct in_addr |
|
| Line 1739 save_rte(u_char *option, struct in_addr |
|
| #endif /* 0 */ |
#endif /* 0 */ |
| if (olen > sizeof(ip_srcrt) - (1 + sizeof(dst))) |
if (olen > sizeof(ip_srcrt) - (1 + sizeof(dst))) |
| return; |
return; |
| bcopy((void *)option, (void *)ip_srcrt.srcopt, olen); |
memcpy( (void *)ip_srcrt.srcopt, (void *)option, olen); |
| ip_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr); |
ip_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr); |
| ip_srcrt.dst = dst; |
ip_srcrt.dst = dst; |
| } |
} |