aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-03-06 10:56:26 +0100
committerOle Trøan <otroan@employees.org>2018-03-06 11:24:17 +0000
commitfc70e3a89f7a5a8913eac3d89ace578f9d1a7c11 (patch)
treeeeac31d67b94d53d5ed1d60a97a11262c3da0e1b /src/tools
parent51e59688359ddac32ed58f3add3ea9ac358c9132 (diff)
vppapigen: require reply ID different than caller ID
Change-Id: I316dc99881bce6a36904863d3c1c049b4f5cf658 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'src/tools')
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index 620b2ef7b71..a1bb0e184df 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -345,6 +345,10 @@ class VPPAPIParser(object):
| RPC ID RETURNS ID ';'
| RPC ID RETURNS STREAM ID ';'
| RPC ID RETURNS ID EVENTS event_list ';' '''
+ if p[2] == p[4]:
+ # Verify that caller and reply differ
+ self._parse_error('Reply ID ({}) should not be equal to Caller ID'.format(p[2]),
+ self._token_coord(p, 1))
if len(p) == 8:
p[0] = Service(p[2], p[4], p[6])
elif len(p) == 7: