protected boolean handleAgentForwarding(Buffer buffer) throws IOException {
boolean wantReply = buffer.getBoolean();
final ServerSession server = (ServerSession) session;
final ForwardingFilter filter = server.getServerFactoryManager().getForwardingFilter();
if (filter == null || !filter.canForwardAgent(server)) {
if (wantReply) {
buffer = session.createBuffer(SshConstants.Message.SSH_MSG_CHANNEL_FAILURE, 0);
buffer.putInt(recipient);
session.writePacket(buffer);
}