mtp: Make it possible to block a link.

The semantic of a block is to take the physical
link down, call mtp_link_down and to make sure
that the link remains down and no packets are
forwarded there. The unblock call will reset the
link and this should get it back into operation
again.
diff --git a/src/sctp_m2ua.c b/src/sctp_m2ua.c
index 65fde0b..d0e88da 100644
--- a/src/sctp_m2ua.c
+++ b/src/sctp_m2ua.c
@@ -327,8 +327,10 @@
 	memcpy(msg->l2h, data->dat, data->len);
 
 	link = &conn->trans->base;
-	mtp_handle_pcap(link, NET_IN, msg->l2h, msgb_l2len(msg));
-	mtp_link_set_data(link, msg);
+	if (!link->blocked) {
+		mtp_handle_pcap(link, NET_IN, msg->l2h, msgb_l2len(msg));
+		mtp_link_set_data(link, msg);
+	}
 	msgb_free(msg);
 
 	return 0;
@@ -526,6 +528,12 @@
 		return -1;
 	}
 
+	if (!trans->base.blocked) {
+		LOGP(DINP, LOGL_NOTICE, "The link is blocked.\n");
+		close(s);
+		return -1;
+	}
+
 	LOGP(DINP, LOGL_NOTICE, "Got a new SCTP connection.\n");
 	conn = talloc_zero(fd->data, struct sctp_m2ua_conn);
 	if (!conn) {
@@ -621,7 +629,7 @@
 		return NULL;
 	}
 
-	trans->base.shutdown = sctp_m2ua_dummy;
+	trans->base.shutdown = sctp_m2ua_reset;
 	trans->base.clear_queue = sctp_m2ua_dummy;
 	trans->base.reset = sctp_m2ua_reset;
 	trans->base.start = sctp_m2ua_start;