git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare for post-2.2.0 (2.2.90).
[sliver-openvswitch.git]
/
lib
/
ofp-util.c
diff --git
a/lib/ofp-util.c
b/lib/ofp-util.c
index
af2d853
..
3484394
100644
(file)
--- a/
lib/ofp-util.c
+++ b/
lib/ofp-util.c
@@
-85,7
+85,7
@@
ofputil_netmask_to_wcbits(ovs_be32 netmask)
void
ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *wc)
{
void
ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *wc)
{
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 2
5
);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 2
6
);
/* Initialize most of wc. */
flow_wildcards_init_catchall(wc);
/* Initialize most of wc. */
flow_wildcards_init_catchall(wc);
@@
-5394,8
+5394,12
@@
ofputil_port_to_ofp11(ofp_port_t ofp10_port)
bool
ofputil_port_from_string(const char *s, ofp_port_t *portp)
{
bool
ofputil_port_from_string(const char *s, ofp_port_t *portp)
{
- u
int32_t port32;
+ u
nsigned int port32; /* int is at least 32 bits wide. */
+ if (*s == '-') {
+ VLOG_WARN("Negative value %s is not a valid port number.", s);
+ return false;
+ }
*portp = 0;
if (str_to_uint(s, 10, &port32)) {
if (port32 < ofp_to_u16(OFPP_MAX)) {
*portp = 0;
if (str_to_uint(s, 10, &port32)) {
if (port32 < ofp_to_u16(OFPP_MAX)) {