summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/protocols_bgp.py4
-rwxr-xr-xsrc/op_mode/show_interfaces.py6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/conf_mode/protocols_bgp.py b/src/conf_mode/protocols_bgp.py
index 2bdeb5bcc..a8c8ff2a2 100755
--- a/src/conf_mode/protocols_bgp.py
+++ b/src/conf_mode/protocols_bgp.py
@@ -184,12 +184,12 @@ def verify(bgp):
verify_route_map(afi_config['route_map'][tmp], bgp)
if 'route_reflector_client' in afi_config:
- if 'remote_as' in peer_config and bgp['local_as'] != peer_config['remote_as']:
+ if 'remote_as' in peer_config and peer_config['remote_as'] != 'internal' and peer_config['remote_as'] != bgp['local_as']:
raise ConfigError('route-reflector-client only supported for iBGP peers')
else:
if 'peer_group' in peer_config:
peer_group_as = dict_search(f'peer_group.{peer_group}.remote_as', bgp)
- if peer_group_as != None and peer_group_as != bgp['local_as']:
+ if peer_group_as != None and peer_group_as != 'internal' and peer_group_as != bgp['local_as']:
raise ConfigError('route-reflector-client only supported for iBGP peers')
# Throw an error if a peer group is not configured for allow range
diff --git a/src/op_mode/show_interfaces.py b/src/op_mode/show_interfaces.py
index 39e5dc7ac..20d5d9e17 100755
--- a/src/op_mode/show_interfaces.py
+++ b/src/op_mode/show_interfaces.py
@@ -26,7 +26,7 @@ import netifaces
from vyos.ifconfig import Section
from vyos.ifconfig import Interface
from vyos.ifconfig import VRRP
-from vyos.util import cmd
+from vyos.util import cmd, call
# interfaces = Sections.reserved()
@@ -95,6 +95,10 @@ def split_text(text, used=0):
text: the string to split
used: number of characted already used in the screen
"""
+ no_tty = call('tty -s')
+ if no_tty:
+ return text.split()
+
returned = cmd('stty size')
if len(returned) == 2:
rows, columns = [int(_) for _ in returned]