From: Justin Pettit Date: Mon, 9 Mar 2009 01:04:58 +0000 (-0700) Subject: Have secchan reply to OpenFlow echo requests. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c221978c9e591cf4aa4138ca465b0a8fe8269646;p=openvswitch Have secchan reply to OpenFlow echo requests. --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index ef0f3d6b..a95a2ef0 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -1215,6 +1215,14 @@ hton_ofp_phy_port(struct ofp_phy_port *opp) opp->peer = htonl(opp->peer); } +static int +handle_echo_request(struct ofconn *ofconn, struct ofp_header *oh) +{ + struct ofp_header *rq = oh; + queue_tx(make_echo_reply(rq), ofconn); + return 0; +} + static int handle_features_request(struct ofproto *p, struct ofconn *ofconn, struct ofp_header *oh) @@ -2387,6 +2395,10 @@ handle_openflow(struct ofconn *ofconn, struct ofproto *p, int error; switch (oh->type) { + case OFPT_ECHO_REQUEST: + error = handle_echo_request(ofconn, oh); + break; + case OFPT_ECHO_REPLY: error = 0; break;