Permalink
Browse files

use macros instead of hardcoded addresses.

  • Loading branch information...
1 parent 5740ece commit 926f97d96aaa870944278d9778025a19dcd201b9 keiichi committed Dec 16, 2005
Showing with 8 additions and 4 deletions.
  1. +4 −2 kame/kame/shisad/babymdd.c
  2. +4 −2 kame/kame/shisad/mdd_probe.c
@@ -1,4 +1,4 @@
-/* $Id: babymdd.c,v 1.14 2005/12/16 00:10:11 ryuji Exp $ */
+/* $Id: babymdd.c,v 1.15 2005/12/16 02:20:25 keiichi Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
@@ -66,6 +66,8 @@
#include "callout.h"
#include "shisad.h"
+#define LINKLOCAL_ALLROUTERS "ff02::2"
+
#define storage2sin6(x) ((struct sockaddr_in6 *)(x))
/* base functions */
@@ -1259,7 +1261,7 @@ send_rs(struct if_info *ifinfo) {
}
memset(&to, 0, sizeof(to));
- if (inet_pton(AF_INET6, "ff02::2",&to.sin6_addr) != 1) {
+ if (inet_pton(AF_INET6, LINKLOCAL_ALLROUTERS, &to.sin6_addr) != 1) {
close (icmpsock);
return (-1);
}
@@ -1,4 +1,4 @@
-/* $KAME: mdd_probe.c,v 1.3 2005/04/14 06:22:36 suz Exp $ */
+/* $KAME: mdd_probe.c,v 1.4 2005/12/16 02:20:25 keiichi Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -53,6 +53,8 @@
#include "mdd.h"
+#define LINKLOCAL_ALLROUTERS "ff02::2"
+
extern struct cifl cifl_head;
static int send_rs(struct cif *);
@@ -155,7 +157,7 @@ send_rs(cifp)
memset(&to, 0, sizeof(to));
- if (inet_pton(AF_INET6, "ff02::1",&to.sin6_addr) != 1) {
+ if (inet_pton(AF_INET6, LINKLOCAL_ALLROUTERS, &to.sin6_addr) != 1) {
close (icmpsock);
return (-1);
}

0 comments on commit 926f97d

Please sign in to comment.