More checking of M_PREPEND() return values: pass through link-layer

Appletalk code.  These changes are untested since I don't have
an Appletalk environment.
This commit is contained in:
Robert Watson 2003-08-29 19:27:09 +00:00
parent 2166ffe8e1
commit b50a132f22
2 changed files with 8 additions and 0 deletions

View file

@ -167,6 +167,9 @@ aarpwhohas( struct arpcom *ac, struct sockaddr_at *sat )
sizeof( eh->ether_dhost ));
eh->ether_type = htons(sizeof(struct llc) + sizeof(struct ether_aarp));
M_PREPEND( m, sizeof( struct llc ), M_TRYWAIT );
if ( m == NULL ) {
return;
}
llc = mtod( m, struct llc *);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI;
@ -581,6 +584,9 @@ aarpprobe( void *arg )
eh->ether_type = htons( sizeof( struct llc ) +
sizeof( struct ether_aarp ));
M_PREPEND( m, sizeof( struct llc ), M_TRYWAIT );
if ( m == NULL ) {
return;
}
llc = mtod( m, struct llc *);
llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP;
llc->llc_control = LLC_UI;

View file

@ -56,6 +56,8 @@ ddp_output( struct mbuf *m, struct socket *so)
#endif
M_PREPEND( m, sizeof( struct ddpehdr ), M_TRYWAIT );
if ( m == NULL )
return( ENOBUFS );
deh = mtod( m, struct ddpehdr *);
deh->deh_pad = 0;