diff options
| author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2019-10-20 14:15:45 +0000 |
|---|---|---|
| committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2019-10-20 14:15:45 +0000 |
| commit | 760fa2ab5d12880865aec9b7dec8f1bc59f1ab0a (patch) | |
| tree | d4d998be38fe7562bb4ee0ca337f46cfcc59ad0e /sys/dev/netmap | |
| parent | 26abae3f17644c606271c829b0b3e9332422bd22 (diff) | |
Notes
Diffstat (limited to 'sys/dev/netmap')
| -rw-r--r-- | sys/dev/netmap/netmap.c | 3 | ||||
| -rw-r--r-- | sys/dev/netmap/netmap_legacy.c | 2 | ||||
| -rw-r--r-- | sys/dev/netmap/netmap_mem2.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index 5eda4019c238c..982f76d45faa7 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -3316,7 +3316,8 @@ nmreq_getoption(struct nmreq_header *hdr, uint16_t reqtype) if (!hdr->nr_options) return NULL; - opt_tab = (struct nmreq_option **)(hdr->nr_options) - (NETMAP_REQ_OPT_MAX + 1); + opt_tab = (struct nmreq_option **)((uintptr_t)hdr->nr_options) - + (NETMAP_REQ_OPT_MAX + 1); return opt_tab[reqtype]; } diff --git a/sys/dev/netmap/netmap_legacy.c b/sys/dev/netmap/netmap_legacy.c index dd875c80e6aa7..55b10a54721b9 100644 --- a/sys/dev/netmap/netmap_legacy.c +++ b/sys/dev/netmap/netmap_legacy.c @@ -100,7 +100,7 @@ nmreq_register_from_legacy(struct nmreq *nmr, struct nmreq_header *hdr, /* No space for the pipe suffix. */ return ENOBUFS; } - strncat(hdr->nr_name, suffix, strlen(suffix)); + strlcat(hdr->nr_name, suffix, sizeof(hdr->nr_name)); req->nr_mode = NR_REG_ALL_NIC; req->nr_ringid = 0; } diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index edb471cedaa2f..d07c502ab6a89 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -2447,8 +2447,8 @@ netmap_mem_pt_guest_ifp_del(struct netmap_mem_d *nmd, struct ifnet *ifp) } else { ptnmd->pt_ifs = curr->next; } - nm_prinf("removed (ifp=%p,nifp_offset=%u)", - curr->ifp, curr->nifp_offset); + nm_prinf("removed (ifp=%s,nifp_offset=%u)", + curr->ifp->if_xname, curr->nifp_offset); nm_os_free(curr); ret = 0; break; |
