diff options
| author | Mantas Mikulėnas <grawity@gmail.com> | 2017-03-24 12:01:45 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2017-03-24 12:21:17 +0000 |
| commit | b76edfe80bc2435fbe3ff973f3b28d77b83eb114 (patch) | |
| tree | e281d9002b331193d76d53351f1e09c576ed3e99 | |
| parent | f2ad8bea1043ac20369d1e0d48c4351710def26f (diff) | |
| download | parpd-b76edfe80bc2435fbe3ff973f3b28d77b83eb114.tar.xz | |
Do not crash when ifa_addr is null
Summary:
This happens with tun interfaces, which are layer 3 only.
Fixes T109.
Reviewers: roy
Reviewed By: roy
Maniphest Tasks: T109
Differential Revision: https://dev.marples.name/D103
| -rw-r--r-- | parpd.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -474,6 +474,8 @@ ifa_valid(int s, const struct ifaddrs *ifa) { struct ifreq ifr; + if (ifa->ifa_addr == NULL) + return 0; #ifdef AF_LINK if (ifa->ifa_addr->sa_family != AF_LINK) return 0; |
