X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fdatapath.c;h=432315b115e2557ffa1ea68e818838391fa246da;hb=541d0fee0dbb7af69f7d33e163838a95bfc021b0;hp=67c4cf43bad5852a1d837d42baba894011208647;hpb=8623e6c16e7af939ed97e84b7e9b338215f04d49;p=sliver-openvswitch.git diff --git a/datapath/datapath.c b/datapath/datapath.c index 67c4cf43b..432315b11 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -240,8 +240,8 @@ static int new_dp(int dp_idx) printk("datapath: problem setting up 'of' device\n"); #endif - dp->config.flags = 0; - dp->config.miss_send_len = htons(OFP_DEFAULT_MISS_SEND_LEN); + dp->flags = 0; + dp->miss_send_len = OFP_DEFAULT_MISS_SEND_LEN; dp->dp_task = kthread_run(dp_maint_func, dp, "dp%d", dp_idx); if (IS_ERR(dp->dp_task)) @@ -698,13 +698,14 @@ dp_send_config_reply(struct datapath *dp, const struct sender *sender) struct sk_buff *skb; struct ofp_switch_config *osc; - osc = alloc_openflow_skb(dp, sizeof *osc, OFPT_PORT_STATUS, sender, + osc = alloc_openflow_skb(dp, sizeof *osc, OFPT_GET_CONFIG_REPLY, sender, &skb); if (!osc) return -ENOMEM; - memcpy(((char *)osc) + sizeof osc->header, - ((char *)&dp->config) + sizeof dp->config.header, - sizeof dp->config - sizeof dp->config.header); + + osc->flags = htons(dp->flags); + osc->miss_send_len = htons(dp->miss_send_len); + return send_openflow_skb(skb, sender); }