mirror of
https://github.com/nmap/nmap.git
synced 2025-12-16 04:39:03 +00:00
Updated libdnet to not SIOCIFNETMASK before SIOCIFADDR on OpenBSD. This was
reported to break on -current as of May 2013. [Giovanni Bechis]
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o Updated libdnet to not SIOCIFNETMASK before SIOCIFADDR on OpenBSD. This was
|
||||
reported to break on -current as of May 2013. [Giovanni Bechis]
|
||||
|
||||
o Fixed address matching for SCTP (-PY) ping. [Marin Maržić]
|
||||
|
||||
o Removed some non-ANSI-C strftime format strings ("%F") and
|
||||
|
||||
@@ -1855,3 +1855,35 @@ Index: libdnet-stripped/src/addr.c
|
||||
case ARP_HDR_IEEE80211: /* IEEE 802.11 */
|
||||
case ARP_HRD_IEEE80211_RADIOTAP: /* IEEE 802.11 + radiotap header */
|
||||
|
||||
|
||||
o Added compatibility patch for OpenBSD to not SIOCIFNETMASK before
|
||||
SIOCIFADDR. (Giovanni Bechis)
|
||||
|
||||
diff --git a/libdnet-stripped/src/intf.c b/libdnet-stripped/src/intf.c
|
||||
index 4fe059c..184c077 100644
|
||||
--- a/libdnet-stripped/src/intf.c
|
||||
+++ b/libdnet-stripped/src/intf.c
|
||||
@@ -77,7 +77,13 @@
|
||||
/* XXX - superset of ifreq, for portable SIOC{A,D}IFADDR */
|
||||
struct dnet_ifaliasreq {
|
||||
char ifra_name[IFNAMSIZ];
|
||||
- struct sockaddr ifra_addr;
|
||||
+ union {
|
||||
+ struct sockaddr ifrau_addr;
|
||||
+ int ifrau_align;
|
||||
+ } ifra_ifrau;
|
||||
+#ifndef ifra_addr
|
||||
+#define ifra_addr ifra_ifrau.ifrau_addr
|
||||
+#endif
|
||||
struct sockaddr ifra_brdaddr;
|
||||
struct sockaddr ifra_mask;
|
||||
int ifra_cookie; /* XXX - IRIX!@#$ */
|
||||
@@ -308,7 +314,7 @@ intf_set(intf_t *intf, const struct intf_entry *entry)
|
||||
}
|
||||
/* Set interface address. */
|
||||
if (entry->intf_addr.addr_type == ADDR_TYPE_IP) {
|
||||
-#ifdef BSD
|
||||
+#if defined(BSD) && !defined(__OPENBSD__)
|
||||
/* XXX - why must this happen before SIOCSIFADDR? */
|
||||
if (addr_btos(entry->intf_addr.addr_bits,
|
||||
&ifr.ifr_addr) == 0) {
|
||||
|
||||
@@ -77,7 +77,13 @@
|
||||
/* XXX - superset of ifreq, for portable SIOC{A,D}IFADDR */
|
||||
struct dnet_ifaliasreq {
|
||||
char ifra_name[IFNAMSIZ];
|
||||
struct sockaddr ifra_addr;
|
||||
union {
|
||||
struct sockaddr ifrau_addr;
|
||||
int ifrau_align;
|
||||
} ifra_ifrau;
|
||||
#ifndef ifra_addr
|
||||
#define ifra_addr ifra_ifrau.ifrau_addr
|
||||
#endif
|
||||
struct sockaddr ifra_brdaddr;
|
||||
struct sockaddr ifra_mask;
|
||||
int ifra_cookie; /* XXX - IRIX!@#$ */
|
||||
@@ -308,7 +314,7 @@ intf_set(intf_t *intf, const struct intf_entry *entry)
|
||||
}
|
||||
/* Set interface address. */
|
||||
if (entry->intf_addr.addr_type == ADDR_TYPE_IP) {
|
||||
#ifdef BSD
|
||||
#if defined(BSD) && !defined(__OPENBSD__)
|
||||
/* XXX - why must this happen before SIOCSIFADDR? */
|
||||
if (addr_btos(entry->intf_addr.addr_bits,
|
||||
&ifr.ifr_addr) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user