"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/bgpd/control.c" between
openbgpd-6.7p0.tar.gz and openbgpd-6.8p0.tar.gz

About: OpenBGPD is a Border Gateway Protocol (BGP) daemon which manages the network routing tables. Its main purpose is to exchange information concerning "network reachability" with other BGP systems.

control.c  (openbgpd-6.7p0):control.c  (openbgpd-6.8p0)
/* $OpenBSD: control.c,v 1.99 2019/08/12 15:02:05 claudio Exp $ */ /* $OpenBSD: control.c,v 1.100 2020/05/10 13:38:46 deraadt Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies. * copyright notice and this permission notice appear in all copies.
* *
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
skipping to change at line 378 skipping to change at line 378
RB_FOREACH(p, peer_head, peers) { RB_FOREACH(p, peer_head, peers) {
if (!peer_matched(p, neighbor)) if (!peer_matched(p, neighbor))
continue; continue;
matched = 1; matched = 1;
switch (imsg.hdr.type) { switch (imsg.hdr.type) {
case IMSG_CTL_NEIGHBOR_UP: case IMSG_CTL_NEIGHBOR_UP:
bgp_fsm(p, EVNT_START); bgp_fsm(p, EVNT_START);
p->conf.down = 0; p->conf.down = 0;
p->conf.shutcomm[0] = '\0'; p->conf.reason[0] = '\0';
p->IdleHoldTime = p->IdleHoldTime =
INTERVAL_IDLE_HOLD_INITIAL; INTERVAL_IDLE_HOLD_INITIAL;
p->errcnt = 0; p->errcnt = 0;
control_result(c, CTL_RES_OK); control_result(c, CTL_RES_OK);
break; break;
case IMSG_CTL_NEIGHBOR_DOWN: case IMSG_CTL_NEIGHBOR_DOWN:
p->conf.down = 1; p->conf.down = 1;
strlcpy(p->conf.shutcomm, strlcpy(p->conf.reason,
neighbor->shutcomm, neighbor->reason,
sizeof(neighbor->shutcomm)); sizeof(neighbor->reason));
session_stop(p, ERR_CEASE_ADMIN_DOWN); session_stop(p, ERR_CEASE_ADMIN_DOWN);
control_result(c, CTL_RES_OK); control_result(c, CTL_RES_OK);
break; break;
case IMSG_CTL_NEIGHBOR_CLEAR: case IMSG_CTL_NEIGHBOR_CLEAR:
strlcpy(p->conf.shutcomm, strlcpy(p->conf.reason,
neighbor->shutcomm, neighbor->reason,
sizeof(neighbor->shutcomm)); sizeof(neighbor->reason));
p->IdleHoldTime = p->IdleHoldTime =
INTERVAL_IDLE_HOLD_INITIAL; INTERVAL_IDLE_HOLD_INITIAL;
p->errcnt = 0; p->errcnt = 0;
if (!p->conf.down) { if (!p->conf.down) {
session_stop(p, session_stop(p,
ERR_CEASE_ADMIN_RESET); ERR_CEASE_ADMIN_RESET);
timer_set(p, Timer_IdleHold, timer_set(p, Timer_IdleHold,
SESSION_CLEAR_DELAY); SESSION_CLEAR_DELAY);
} else { } else {
session_stop(p, session_stop(p,
 End of changes. 4 change blocks. 
8 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)