mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
2166ffe8e1
commit
b50a132f22
2 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue