Don't make nlmon and other weird interfaces crash -L option

This commit is contained in:
Joseph C. Lehner 2021-05-31 17:26:12 +02:00
parent f6f3a00703
commit 98d3a53ae8

View file

@ -111,7 +111,7 @@ static inline bool sockaddr_get_hwaddr(struct sockaddr *sa, uint8_t *hwaddr)
{
void *src;
if (sa->sa_family != NMRPFLASH_AF_PACKET) {
if (!sa || sa->sa_family != NMRPFLASH_AF_PACKET) {
return false;
}