mirror_frr/bgpd
Vincent JARDIN b42d80dd9a bgpd: fix aspath parsing
clang provides a notice about it that this p++ is useless,
because ++ would be done after the return.

From code review, I understand that p shall be incremented
for each token that is parsed from the buf. So let's keep
this intent.

Note that this commit is changing the behaviour of the source
code since from now p++ will be returned instead of p.
However, it does not hurt since the only consumer
just free() the aspath if it is parsed as as_token_unknown.
Let's be safe with a proper execution flow from now.

PS:
C reminders:

int f7(void) {
  int j = 7;

  return ++j; // return 8
}

int f8(void) {
  int j = 7;

  return j++; // return 7
}

Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-10-09 09:48:53 +02:00
..
rfapi rfapi: fix clang warning 2017-10-08 23:43:59 +02:00
rfp-example *: reindent 2017-07-17 14:04:07 +02:00
.gitignore lib, bgpd: fix .gitignore 2017-06-29 19:39:36 +00:00
BGP4-MIB.txt Initial revision 2002-12-13 20:15:29 +00:00
bgp_advertise.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
bgp_advertise.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_aspath.c bgpd: fix aspath parsing 2017-10-09 09:48:53 +02:00
bgp_aspath.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_attr_evpn.c *: fix be32 reading / 24-bit left shift 2017-09-09 19:50:58 +02:00
bgp_attr_evpn.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_attr.c bgpd: fix clang warning 2017-10-09 01:22:02 +02:00
bgp_attr.h bgpd: rip out bgp_attr_deep_dup(), fix table-map 2017-09-07 15:19:06 +02:00
bgp_bfd.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
bgp_bfd.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_btoa.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
bgp_clist.c *: fix be32 reading / 24-bit left shift 2017-09-09 19:50:58 +02:00
bgp_clist.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_community.c bgpd: Add various hash optimizations 2017-09-05 14:33:06 -04:00
bgp_community.h bgpd: implement draft-ietf-grow-bgp-gshut-10 2017-08-25 18:27:49 +00:00
bgp_damp.c *: Define the number of seconds in a Day, Week and year 2017-08-08 09:06:22 -04:00
bgp_damp.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_debug.c bgpd: remove clippy references in bgp_debug.c 2017-09-27 13:18:43 +00:00
bgp_debug.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_dump.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
bgp_dump.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_ecommunity.c bgpd: deduplicate struct definition 2017-09-13 11:47:35 -04:00
bgp_ecommunity.h bgpd: deduplicate struct definition 2017-09-13 11:47:35 -04:00
bgp_encap_tlv.c *: fix be32 reading / 24-bit left shift 2017-09-09 19:50:58 +02:00
bgp_encap_tlv.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_encap_types.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_evpn_private.h *: fix style 2017-08-30 11:27:11 -04:00
bgp_evpn_vty.c *: use argv[]->text instead of argv[]->arg when appropriate 2017-10-05 22:54:42 -03:00
bgp_evpn_vty.h bgpd: get rid of afi_header_vty_out() & co. 2017-08-29 08:36:03 +02:00
bgp_evpn.c *: Convert list_free usage to list_delete 2017-10-05 10:53:17 -04:00
bgp_evpn.h zebra: Fix MAC change handling for a neighbor 2017-08-17 03:54:38 -07:00
bgp_filter.c bgpd: fix clang warning 2017-10-08 23:50:54 +02:00
bgp_filter.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_fsm.c lib: remove SAFI_RESERVED_4 and SAFI_RESERVED_5 2017-07-31 23:38:38 -03:00
bgp_fsm.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_label.c bgpd: fix clang warning 2017-10-08 23:45:10 +02:00
bgp_label.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_lcommunity.c *: fix be32 reading / 24-bit left shift 2017-09-09 19:50:58 +02:00
bgp_lcommunity.h bgpd: Fixed some comments in bgp_lcommunity.h 2017-09-03 06:35:53 +00:00
bgp_main.c *: Convert list_delete(struct list *) to ** to allow nulling 2017-10-05 10:53:13 -04:00
bgp_memory.c bgpd: Ignore EVPN routes from CLAG peer when VNI comes up 2017-08-16 23:19:58 -07:00
bgp_memory.h bgpd: Ignore EVPN routes from CLAG peer when VNI comes up 2017-08-16 23:19:58 -07:00
bgp_mpath.c bgpd: Fix nexthop comparison for v6 2017-07-26 14:18:30 -04:00
bgp_mpath.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_mplsvpn.c bgpd: fix 'show bgp ipvX vpn rd' command 2017-10-05 10:11:49 -04:00
bgp_mplsvpn.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_network.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
bgp_network.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_nexthop.c bgpd: Reduce multiaccess_check_v4 overhead for subgroups 2017-09-26 20:06:13 -04:00
bgp_nexthop.h bgpd: Reduce multiaccess_check_v4 overhead for subgroups 2017-09-26 20:06:13 -04:00
bgp_nht.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
bgp_nht.h bgpd: Cleanup NHT state when underlying VRF goes down 2017-08-17 02:54:14 -07:00
bgp_open.c lib: new APIs for get/set system hostname/domainname 2017-08-28 17:16:52 -07:00
bgp_open.h bgpd: don't make any assumptions about the size of an enum 2017-07-31 23:45:03 -03:00
bgp_packet.c lib/bgpd: introduce the iana_safi_t enum 2017-07-31 23:44:42 -03:00
bgp_packet.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_rd.c *: fix be32 reading / 24-bit left shift 2017-09-09 19:50:58 +02:00
bgp_rd.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_regex.c *: reindent 2017-07-17 14:04:07 +02:00
bgp_regex.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_route.c bgpd: Fixup json with RouteDistinguishers 2017-10-05 10:12:00 -04:00
bgp_route.h bgpd: unify 'show bgp' with RD with normal unicast bgp show 2017-10-05 10:11:49 -04:00
bgp_routemap.c *: support keywords that begin with uppercase letter 2017-09-14 18:07:30 +00:00
bgp_snmp.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
bgp_table.c *: reindent 2017-07-17 14:04:07 +02:00
bgp_table.h bgpd: bgp process queue optimization 2017-08-17 17:58:35 +02:00
bgp_updgrp_adv.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
bgp_updgrp_packet.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
bgp_updgrp.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
bgp_updgrp.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
bgp_vnc_types.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_vpn.c bgpd/ospfd: fix json leaks and blank output 2017-07-26 12:28:56 -03:00
bgp_vpn.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_vty.c bgpd: remove old/broken vpnv4 from of show bgp 2017-10-05 10:11:49 -04:00
bgp_vty.h bgpd: get rid of afi_header_vty_out() & co. 2017-08-29 08:36:03 +02:00
bgp_zebra.c *: Convert list_free usage to list_delete 2017-10-05 10:53:17 -04:00
bgp_zebra.h bgpd: get rid of afi_header_vty_out() & co. 2017-08-29 08:36:03 +02:00
bgpd.c *: Convert list_free usage to list_delete 2017-10-05 10:53:17 -04:00
bgpd.conf.sample bgpd: hide "router bgp" commands also under "address-family ipv4 unicast" 2017-05-04 17:06:13 +00:00
bgpd.conf.sample2 Initial revision 2002-12-13 20:15:29 +00:00
bgpd.conf.vnc.sample bgpd: hide "router bgp" commands also under "address-family ipv4 unicast" 2017-05-04 17:06:13 +00:00
bgpd.h Merge pull request #1047 from dwalton76/bgpd-draft-ietf-grow-bgp-gshut-10 2017-09-05 10:20:49 -03:00
IMPLEMENTATION.txt Adjust size complexity estimates. Still not quite right, but closer. 2005-02-15 17:10:03 +00:00
Makefile.am bgpd: remove clippy references in bgp_debug.c 2017-09-27 13:18:43 +00:00