SCCS-vsn: sys/netinet/in.c 7.19
SCCS-vsn: sys/netns/ns.c 7.9
SCCS-vsn: sys/netiso/iso.c 7.17
SCCS-vsn: sys/netiso/if_eon.c 7.17
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)in.c 7.18 (Berkeley) %G%
+ * @(#)in.c 7.19 (Berkeley) %G%
register struct ifaddr *ifa;
struct in_ifaddr *oia;
struct in_aliasreq *ifra = (struct in_aliasreq *)data;
register struct ifaddr *ifa;
struct in_ifaddr *oia;
struct in_aliasreq *ifra = (struct in_aliasreq *)data;
struct sockaddr_in oldaddr;
int error, hostIsNew, maskIsNew;
u_long i;
struct sockaddr_in oldaddr;
int error, hostIsNew, maskIsNew;
u_long i;
if (ifp == 0)
panic("in_control");
if (ia == (struct in_ifaddr *)0) {
if (ifp == 0)
panic("in_control");
if (ia == (struct in_ifaddr *)0) {
- m = m_getclr(M_WAIT, MT_IFADDR);
- if (m == (struct mbuf *)NULL)
+ oia = (struct in_ifaddr *)
+ malloc(sizeof *oia, M_IFADDR, M_WAITOK);
+ if (oia == (struct in_ifaddr *)NULL)
+ bzero((caddr_t)oia, sizeof *oia);
if (ia = in_ifaddr) {
for ( ; ia->ia_next; ia = ia->ia_next)
;
if (ia = in_ifaddr) {
for ( ; ia->ia_next; ia = ia->ia_next)
;
- ia->ia_next = mtod(m, struct in_ifaddr *);
- in_ifaddr = mtod(m, struct in_ifaddr *);
- ia = mtod(m, struct in_ifaddr *);
+ in_ifaddr = oia;
+ ia = oia;
if (ifa = ifp->if_addrlist) {
for ( ; ifa->ifa_next; ifa = ifa->ifa_next)
;
if (ifa = ifp->if_addrlist) {
for ( ; ifa->ifa_next; ifa = ifa->ifa_next)
;
else
printf("Didn't unlink inifadr from list\n");
}
else
printf("Didn't unlink inifadr from list\n");
}
- (void) m_free(dtom(oia));
+ IFAFREE((&oia->ia_ifa));
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)if_eon.c 7.16 (Berkeley) %G%
+ * @(#)if_eon.c 7.17 (Berkeley) %G%
*/
/***********************************************************
*/
/***********************************************************
ifp->if_flags |= IFF_UP;
if (ifa->ifa_addr->sa_family != AF_LINK)
ifa->ifa_rtrequest = eonrtrequest;
ifp->if_flags |= IFF_UP;
if (ifa->ifa_addr->sa_family != AF_LINK)
ifa->ifa_rtrequest = eonrtrequest;
- ifa->ifa_llinfolen = sizeof(struct eon_llinfo);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)iso.c 7.16 (Berkeley) %G%
+ * @(#)iso.c 7.17 (Berkeley) %G%
*/
/***********************************************************
*/
/***********************************************************
else
printf("Didn't unlink isoifadr from list\n");
}
else
printf("Didn't unlink isoifadr from list\n");
}
- free((caddr_t)oia, M_IFADDR);
+ IFAFREE((&oia->ia_ifa));
if (ifp->if_output == ether_output) {
ia->ia_ifa.ifa_rtrequest = llc_rtrequest;
ia->ia_ifa.ifa_flags |= RTF_CLONING;
if (ifp->if_output == ether_output) {
ia->ia_ifa.ifa_rtrequest = llc_rtrequest;
ia->ia_ifa.ifa_flags |= RTF_CLONING;
- ia->ia_ifa.ifa_llinfolen = sizeof(struct llinfo_llc);
}
/*
* Add route for the network.
}
/*
* Add route for the network.
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ns.c 7.8 (Berkeley) %G%
+ * @(#)ns.c 7.9 (Berkeley) %G%
register struct ns_ifaddr *ia;
struct ifaddr *ifa;
struct ns_ifaddr *oia;
register struct ns_ifaddr *ia;
struct ifaddr *ifa;
struct ns_ifaddr *oia;
int error, dstIsNew, hostIsNew;
/*
int error, dstIsNew, hostIsNew;
/*
case SIOCSIFADDR:
case SIOCSIFDSTADDR:
if (ia == (struct ns_ifaddr *)0) {
case SIOCSIFADDR:
case SIOCSIFDSTADDR:
if (ia == (struct ns_ifaddr *)0) {
- m = m_getclr(M_WAIT, MT_IFADDR);
- if (m == (struct mbuf *)NULL)
+ oia = (struct ns_ifaddr *)
+ malloc(sizeof *ia, M_IFADDR, M_WAITOK);
+ if (oia == (struct ns_ifaddr *)NULL)
return (ENOBUFS);
if (ia = ns_ifaddr) {
for ( ; ia->ia_next; ia = ia->ia_next)
;
return (ENOBUFS);
if (ia = ns_ifaddr) {
for ( ; ia->ia_next; ia = ia->ia_next)
;
- ia->ia_next = mtod(m, struct ns_ifaddr *);
- ns_ifaddr = mtod(m, struct ns_ifaddr *);
- ia = mtod(m, struct ns_ifaddr *);
+ ns_ifaddr = oia;
+ ia = oia;
if (ifa = ifp->if_addrlist) {
for ( ; ifa->ifa_next; ifa = ifa->ifa_next)
;
if (ifa = ifp->if_addrlist) {
for ( ; ifa->ifa_next; ifa = ifa->ifa_next)
;
else
printf("Didn't unlink nsifadr from list\n");
}
else
printf("Didn't unlink nsifadr from list\n");
}
- (void) m_free(dtom(oia));
+ IFAFREE((&oia->ia_ifa));
if (0 == --ns_interfaces) {
/*
* We reset to virginity and start all over again
if (0 == --ns_interfaces) {
/*
* We reset to virginity and start all over again