From 8c02ae53f28e11c13c3d78b64e8546621900209c Mon Sep 17 00:00:00 2001 From: Jiri Benc Date: Fri, 11 Apr 2014 12:25:51 +0200 Subject: [PATCH] raw: replace hard coded constants by MAC_LEN Signed-off-by: Jiri Benc --- raw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raw.c b/raw.c index 795292f..2afe8a2 100644 --- a/raw.c +++ b/raw.c @@ -102,14 +102,14 @@ static int raw_configure(int fd, int event, int index, mreq.mr_ifindex = index; mreq.mr_type = PACKET_MR_MULTICAST; - mreq.mr_alen = 6; - memcpy(mreq.mr_address, addr1, 6); + mreq.mr_alen = MAC_LEN; + memcpy(mreq.mr_address, addr1, MAC_LEN); err1 = setsockopt(fd, SOL_PACKET, option, &mreq, sizeof(mreq)); if (err1) pr_warning("setsockopt PACKET_MR_MULTICAST failed: %m"); - memcpy(mreq.mr_address, addr2, 6); + memcpy(mreq.mr_address, addr2, MAC_LEN); err2 = setsockopt(fd, SOL_PACKET, option, &mreq, sizeof(mreq)); if (err2)