diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-02-24 17:03:28 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-02-24 17:13:30 -0800 |
| commit | a02e5331f6064a7b9dd11f1091ab9fcb1bbdadcc (patch) | |
| tree | 1ee2ec5f9c71ca2abe54140c3e6d7e9300cf38f3 /ofproto | |
| parent | 54ae6fa8f1ae7401652d282609848605fc283104 (diff) | |
| download | openvswitch-a02e5331f6064a7b9dd11f1091ab9fcb1bbdadcc.tar.gz | |
ofproto: Log warning if controller requests an invalid table.
This might have saved us some time debugging.
Diffstat (limited to 'ofproto')
| -rw-r--r-- | ofproto/ofproto.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 61d08ea48..2efb03afd 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3543,7 +3543,16 @@ put_ofp_flow_stats(struct ofconn *ofconn, struct rule *rule, static bool is_valid_table(uint8_t table_id) { - return table_id == 0 || table_id == 0xff; + if (table_id == 0 || table_id == 0xff) { + return true; + } else { + /* It would probably be better to reply with an error but there doesn't + * seem to be any appropriate value, so that might just be + * confusing. */ + VLOG_WARN_RL(&rl, "controller asked for invalid table %"PRIu8, + table_id); + return false; + } } static int |
