diff options
| author | Donald Sharp <sharpd@cumulusnetwroks.com> | 2016-07-22 23:12:06 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-21 20:26:03 -0500 | 
| commit | 5074a4230a11607b837fe07c7419ce5b3275f942 (patch) | |
| tree | 6f09e867e55721c9331b80a51e1ce867daf42e88 /pimd/pim_assert.c | |
| parent | 05e451f828dce67a38ffb234258cfb10660619d7 (diff) | |
pimd: more source,group conversion to prefix sg
Convert more of the code to pass around a 'struct prefix sg'
instead of individual struct addr's.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_assert.c')
| -rw-r--r-- | pimd/pim_assert.c | 22 | 
1 files changed, 9 insertions, 13 deletions
diff --git a/pimd/pim_assert.c b/pimd/pim_assert.c index 63f4e33868..e8e3549d24 100644 --- a/pimd/pim_assert.c +++ b/pimd/pim_assert.c @@ -146,16 +146,16 @@ static int dispatch_assert(struct interface *ifp,  			   struct pim_assert_metric recv_metric)  {    struct pim_ifchannel *ch; +  struct prefix sg; -  ch = pim_ifchannel_add(ifp, source_addr, group_addr); +  memset (&sg, 0, sizeof (struct prefix)); +  sg.u.sg.src = source_addr; +  sg.u.sg.grp = group_addr; +  ch = pim_ifchannel_add(ifp, &sg);    if (!ch) { -    char source_str[100]; -    char group_str[100]; -    pim_inet4_dump("<src?>", source_addr, source_str, sizeof(source_str)); -    pim_inet4_dump("<grp?>", group_addr, group_str, sizeof(group_str)); -    zlog_warn("%s: (S,G)=(%s,%s) failure creating channel on interface %s", +    zlog_warn("%s: (S,G)=%s failure creating channel on interface %s",  	      __PRETTY_FUNCTION__, -	      source_str, group_str, ifp->name); +	      pim_str_sg_dump (&sg), ifp->name);      return -1;    } @@ -212,13 +212,9 @@ static int dispatch_assert(struct interface *ifp,      break;    default:      { -      char source_str[100]; -      char group_str[100]; -      pim_inet4_dump("<src?>", source_addr, source_str, sizeof(source_str)); -      pim_inet4_dump("<grp?>", group_addr, group_str, sizeof(group_str)); -      zlog_warn("%s: (S,G)=(%s,%s) invalid assert state %d on interface %s", +      zlog_warn("%s: (S,G)=%s invalid assert state %d on interface %s",  		__PRETTY_FUNCTION__, -		source_str, group_str, ch->ifassert_state, ifp->name); +		pim_str_sg_dump (&sg), ch->ifassert_state, ifp->name);      }      return -2;    }  | 
