Hi,

The "struct peer" input of merge_config() is never used.
Here is a patch to remove it.

Denis

Index: config.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/config.c,v
retrieving revision 1.67
diff -u -p -r1.67 config.c
--- config.c    29 May 2017 09:56:33 -0000      1.67
+++ config.c    3 Oct 2017 18:48:50 -0000
@@ -133,8 +133,7 @@ free_config(struct bgpd_config *conf)
 }
 
 int
-merge_config(struct bgpd_config *xconf, struct bgpd_config *conf,
-    struct peer *peer_l)
+merge_config(struct bgpd_config *xconf, struct bgpd_config *conf)
 {
        struct listen_addr      *nla, *ola, *next;
        struct network          *n;
Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
retrieving revision 1.315
diff -u -p -r1.315 parse.y
--- parse.y     21 Aug 2017 14:41:22 -0000      1.315
+++ parse.y     3 Oct 2017 18:48:50 -0000
@@ -2878,7 +2878,7 @@ parse_config(char *filename, struct bgpd
                merge_filter_lists(conf->filters, filter_l);
 
                errors += mrt_mergeconfig(xconf->mrt, conf->mrt);
-               errors += merge_config(xconf, conf, peer_l);
+               errors += merge_config(xconf, conf);
                *xpeers = peer_l;
 
                for (p = peer_l_old; p != NULL; p = pnext) {
Index: session.h
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/session.h,v
retrieving revision 1.123
diff -u -p -r1.123 session.h
--- session.h   28 May 2017 12:21:36 -0000      1.123
+++ session.h   3 Oct 2017 18:48:50 -0000
@@ -244,8 +244,7 @@ int  carp_demote_get(char *);
 int     carp_demote_set(char *, int);
 
 /* config.c */
-int     merge_config(struct bgpd_config *, struct bgpd_config *,
-           struct peer *);
+int     merge_config(struct bgpd_config *, struct bgpd_config *);
 void    prepare_listeners(struct bgpd_config *);
 int     get_mpe_label(struct rdomain *);
 

Reply via email to