Revision 11cb6202 proto/bgp/config.Y

View differences:

proto/bgp/config.Y
44 44
bgp_proto:
45 45
   bgp_proto_start proto_name '{'
46 46
 | bgp_proto proto_item ';'
47
 | bgp_proto LOCAL AS expr ';' {
48
     if ($4 < 0 || $4 > 65535) cf_error("AS number out of range");
49
     BGP_CFG->local_as = $4;
50
   }
47
 | bgp_proto LOCAL AS expr ';' { BGP_CFG->local_as = $4; }
51 48
 | bgp_proto NEIGHBOR ipa AS expr ';' {
52
     if ($5 < 0 || $5 > 65535) cf_error("AS number out of range");
49
     if (ipa_nonzero(BGP_CFG->remote_ip)) cf_error("Only one neighbor per BGP instance is allowed");
50

  
53 51
     BGP_CFG->remote_ip = $3;
54 52
     BGP_CFG->remote_as = $5;
55 53
   }

Also available in: Unified diff